mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
AC-550 Expose license errors flag, update how license error shows in inventory update stdout.
This commit is contained in:
parent
895c908f5a
commit
18ecdb65da
@ -743,5 +743,7 @@ class Command(NoArgsCommand):
|
||||
self.inventory_update.save(update_fields=['status', 'result_traceback'])
|
||||
transaction.commit()
|
||||
|
||||
if exc:
|
||||
if exc and isinstance(exc, CommandError):
|
||||
sys.exit(1)
|
||||
elif exc:
|
||||
raise exc
|
||||
|
||||
@ -65,8 +65,8 @@ SUMMARIZABLE_FK_FIELDS = {
|
||||
'job_template': DEFAULT_SUMMARY_FIELDS,
|
||||
'last_job': DEFAULT_SUMMARY_FIELDS + ('status', 'failed',),
|
||||
'last_job_host_summary': DEFAULT_SUMMARY_FIELDS + ('failed',),
|
||||
'last_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed',),
|
||||
'current_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed',),
|
||||
'last_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed', 'license_error'),
|
||||
'current_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed', 'license_error'),
|
||||
'inventory_source': ('source', 'last_updated', 'status'),
|
||||
}
|
||||
|
||||
@ -723,7 +723,7 @@ class InventoryUpdateSerializer(BaseSerializer):
|
||||
fields = ('id', 'url', 'related', 'summary_fields', 'created',
|
||||
'modified', 'inventory_source', 'status', 'failed',
|
||||
'result_stdout', 'result_traceback', 'job_args', 'job_cwd',
|
||||
'job_env')
|
||||
'job_env', 'license_error')
|
||||
|
||||
def get_related(self, obj):
|
||||
if obj is None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user