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:
parent
3b5681465a
commit
13c05c68fc
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user