Merge pull request #2569 from ryanpetrello/fix-2476

properly set InventorySource.status for CLI-based inventory_import
This commit is contained in:
Ryan Petrello
2018-07-17 15:08:49 -04:00
committed by GitHub

View File

@@ -1062,6 +1062,8 @@ class Command(BaseCommand):
self.inventory_update.result_traceback = tb
self.inventory_update.status = status
self.inventory_update.save(update_fields=['status', 'result_traceback'])
self.inventory_source.status = status
self.inventory_source.save(update_fields=['status'])
if exc and isinstance(exc, CommandError):
sys.exit(1)