mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
Merge pull request #3333 from ryanpetrello/more-py3-bugs
fix a few additional py3 issues Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
@@ -238,12 +238,10 @@ class JobTypeMetadata(Metadata):
|
|||||||
res = super(JobTypeMetadata, self).get_field_info(field)
|
res = super(JobTypeMetadata, self).get_field_info(field)
|
||||||
|
|
||||||
if field.field_name == 'job_type':
|
if field.field_name == 'job_type':
|
||||||
index = 0
|
res['choices'] = [
|
||||||
for choice in res['choices']:
|
choice for choice in res['choices']
|
||||||
if choice[0] == 'scan':
|
if choice[0] != 'scan'
|
||||||
res['choices'].pop(index)
|
]
|
||||||
break
|
|
||||||
index += 1
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
@@ -253,7 +251,7 @@ class SublistAttachDetatchMetadata(Metadata):
|
|||||||
actions = super(SublistAttachDetatchMetadata, self).determine_actions(request, view)
|
actions = super(SublistAttachDetatchMetadata, self).determine_actions(request, view)
|
||||||
method = 'POST'
|
method = 'POST'
|
||||||
if method in actions:
|
if method in actions:
|
||||||
for field in actions[method]:
|
for field in list(actions[method].keys()):
|
||||||
if field == 'id':
|
if field == 'id':
|
||||||
continue
|
continue
|
||||||
actions[method].pop(field)
|
actions[method].pop(field)
|
||||||
|
|||||||
Reference in New Issue
Block a user