Browse Source

Update order of examples

pull/1544/head
Hironsan 3 years ago
parent
commit
89b9db30be
1 changed files with 1 additions and 1 deletions
  1. 2
      backend/api/views/example.py

2
backend/api/views/example.py

@ -34,7 +34,7 @@ class ExampleList(generics.ListCreateAPIView):
value = random.randrange(2, 20)
queryset = queryset.annotate(sort_id=F('id') % value).order_by('sort_id', 'id')
else:
queryset = queryset.order_by('id')
queryset = queryset.order_by('created_at')
return queryset
def perform_create(self, serializer):

Loading…
Cancel
Save