Skip to content

Commit

Permalink
fix: Fix top five function
Browse files Browse the repository at this point in the history
  • Loading branch information
drorganvidez committed Oct 15, 2024
1 parent af44e9b commit b5e36c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/modules/dataset/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def latest_synchronized(self) -> List[DataSet]:

def get_top_5_datasets_by_feature_model_count(self) -> List[DataSet]:
return (
self.model.query
self.model.query.join(DSMetaData)
.filter(DSMetaData.dataset_doi.isnot(None))
.order_by(self.model.feature_model_count.desc())
.order_by(desc(self.model.created_at))
.limit(5)
Expand Down

0 comments on commit b5e36c8

Please sign in to comment.