1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

fix a few additional py3 issues

related: https://github.com/ansible/awx/issues/3329
This commit is contained in:
Ryan Petrello 2019-02-27 16:43:25 -05:00
parent 3b5681465a
commit 13c05c68fc
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -238,12 +238,10 @@ class JobTypeMetadata(Metadata):
res = super(JobTypeMetadata, self).get_field_info(field)
if field.field_name == 'job_type':
index = 0
for choice in res['choices']:
if choice[0] == 'scan':
res['choices'].pop(index)
break
index += 1
res['choices'] = [
choice for choice in res['choices']
if choice[0] != 'scan'
]
return res
@ -253,7 +251,7 @@ class SublistAttachDetatchMetadata(Metadata):
actions = super(SublistAttachDetatchMetadata, self).determine_actions(request, view)
method = 'POST'
if method in actions:
for field in actions[method]:
for field in list(actions[method].keys()):
if field == 'id':
continue
actions[method].pop(field)