Merge pull request #1015 from ryanpetrello/fix-980

fix another bug that breaks the JT callback process
This commit is contained in:
Ryan Petrello 2018-01-18 14:26:48 -05:00 committed by GitHub
commit 073feb74cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3285,7 +3285,9 @@ class JobTemplateCallback(GenericAPIView):
for inventory_source in inventory_sources:
if inventory_source.needs_update_on_launch:
# FIXME: Doesn't check for any existing updates.
inventory_update = inventory_source.create_inventory_update(launch_type='callback')
inventory_update = inventory_source.create_inventory_update(
**{'_eager_fields': {'launch_type': 'callback'}}
)
inventory_update.signal_start()
inventory_update_pks.add(inventory_update.pk)
inventory_update_qs = InventoryUpdate.objects.filter(pk__in=inventory_update_pks, status__in=('pending', 'waiting', 'running'))