mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 20:00:43 -03:30
detect invalid license thrown by inventory update
This commit is contained in:
parent
d21d3ee191
commit
a930c4d8b2
@ -1217,7 +1217,8 @@ class InventoryUpdate(UnifiedJob, InventorySourceOptions):
|
||||
def save(self, *args, **kwargs):
|
||||
update_fields = kwargs.get('update_fields', [])
|
||||
if bool(('license' in self.result_stdout or 'licensed' in self.result_stdout) and
|
||||
'exceeded' in self.result_stdout and not self.license_error):
|
||||
'exceeded' in self.result_stdout and not self.license_error) or \
|
||||
bool('License has expired' in self.result_stdout or 'License count exceeded'):
|
||||
self.license_error = True
|
||||
if 'license_error' not in update_fields:
|
||||
update_fields.append('license_error')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user