mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
bandaid for scm_delete_on_next_update save issue
This commit is contained in:
parent
c99ea2ccfa
commit
3ad9229ea9
@ -231,7 +231,15 @@ class UnifiedJobTemplate(PolymorphicModel, CommonModelNameNotUnique):
|
||||
if field not in update_fields:
|
||||
update_fields.append(field)
|
||||
# Do the actual save.
|
||||
super(UnifiedJobTemplate, self).save(*args, **kwargs)
|
||||
try:
|
||||
super(UnifiedJobTemplate, self).save(*args, **kwargs)
|
||||
except ValueError:
|
||||
# A fix for https://trello.com/c/S4rU1F21
|
||||
# Does not resolve the root cause. Tis merely a bandaid.
|
||||
if 'scm_delete_on_next_update' in update_fields:
|
||||
update_fields.remove('scm_delete_on_next_update')
|
||||
super(UnifiedJobTemplate, self).save(*args, **kwargs)
|
||||
|
||||
|
||||
def _get_current_status(self):
|
||||
# Override in subclasses as needed.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user