fix: model ordering (#521)

* fix: model ordering

* fix: my pages and create by others pages
This commit is contained in:
pablohashescobar 2023-03-25 11:14:05 +05:30 committed by GitHub
parent c6ba93da72
commit 5152deb2d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 51 additions and 10 deletions

View file

@ -213,7 +213,9 @@ class ImportServiceEndpoint(BaseAPIView):
def get(self, request, slug):
try:
imports = Importer.objects.filter(workspace__slug=slug)
imports = Importer.objects.filter(workspace__slug=slug).order_by(
"-created_at"
)
serializer = ImporterSerializer(imports, many=True)
return Response(serializer.data)
except Exception as e: