A few super minor nits in api views/serializers (#12996)

Signed-off-by: Rick Elrod <rick@elrod.me>
This commit is contained in:
Rick Elrod
2022-10-03 19:24:57 -05:00
committed by GitHub
parent 534763727f
commit 208254ab81
2 changed files with 4 additions and 5 deletions

View File

@@ -2406,9 +2406,8 @@ class JobTemplateLaunch(RetrieveAPIView):
"""
modern_data = data.copy()
id_fd = '{}_id'.format('inventory')
if 'inventory' not in modern_data and id_fd in modern_data:
modern_data['inventory'] = modern_data[id_fd]
if 'inventory' not in modern_data and 'inventory_id' in modern_data:
modern_data['inventory'] = modern_data['inventory_id']
# credential passwords were historically provided as top-level attributes
if 'credential_passwords' not in modern_data: