Merge pull request #5487 from wwitzel3/issue-5341

explicit ordering in workflow_nodes views
This commit is contained in:
Wayne Witzel III
2017-02-27 10:06:58 -05:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -3052,6 +3052,9 @@ class WorkflowJobTemplateWorkflowNodesList(WorkflowsEnforcementMixin, SubListCre
data[fd] = None
return super(WorkflowJobTemplateWorkflowNodesList, self).update_raw_data(data)
def get_queryset(self):
return super(WorkflowJobTemplateWorkflowNodesList, self).get_queryset().order_by('id')
class WorkflowJobTemplateJobsList(WorkflowsEnforcementMixin, SubListAPIView):
@@ -3161,7 +3164,9 @@ class WorkflowJobWorkflowNodesList(WorkflowsEnforcementMixin, SubListAPIView):
relationship = 'workflow_job_nodes'
parent_key = 'workflow_job'
new_in_310 = True
ordering = ('id',)
def get_queryset(self):
return super(WorkflowJobWorkflowNodesList, self).get_queryset().order_by('id')
class WorkflowJobCancel(WorkflowsEnforcementMixin, RetrieveAPIView):

View File

@@ -267,7 +267,6 @@ REST_FRAMEWORK = {
'awx.api.filters.TypeFilterBackend',
'awx.api.filters.FieldLookupBackend',
'rest_framework.filters.SearchFilter',
'rest_framework.filters.OrderingFilter',
'awx.api.filters.OrderByBackend',
),
'DEFAULT_PARSER_CLASSES': (