Skip to content

Commit

Permalink
add -created_at ordering in RepositoryNLPLogViewSet
Browse files Browse the repository at this point in the history
  • Loading branch information
helllllllder committed Aug 18, 2021
1 parent 7b06d02 commit 5cf8d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bothub/api/v2/repository/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,6 @@ class RepositoryNLPLogViewSet(DocumentViewSet):
pagination_class = LimitOffsetPagination
limit = settings.REPOSITORY_NLP_LOG_LIMIT
search_fields = ["text"]

filter_fields = {
"repository_uuid": "repository_uuid",
"language": "language",
Expand All @@ -1132,6 +1131,7 @@ class RepositoryNLPLogViewSet(DocumentViewSet):
"lookups": [LOOKUP_QUERY_LTE, LOOKUP_QUERY_GTE],
},
}
ordering = ('-created_at',)

def filter_queryset(self, queryset):
queryset = super().filter_queryset(queryset)
Expand Down

0 comments on commit 5cf8d69

Please sign in to comment.