feat: dataset list add order by created at (#487)

This commit is contained in:
John Wang 2023-07-05 11:00:21 +08:00 committed by GitHub
parent 5e2c3eeac3
commit ed6648a41e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,6 +35,7 @@ class DatasetService:
permission_filter = Dataset.permission == 'all_team_members'
datasets = Dataset.query.filter(
db.and_(Dataset.provider == provider, Dataset.tenant_id == tenant_id, permission_filter)) \
.order_by(Dataset.created_at.desc()) \
.paginate(
page=page,
per_page=per_page,