Fix bug in inventory update canceling

This commit is contained in:
Alan Rominger 2020-11-30 14:39:02 -05:00
parent 7734def856
commit 900127fde7
No known key found for this signature in database
GPG Key ID: C2D7EAAA12B63559

View File

@ -2763,6 +2763,9 @@ class RunInventoryUpdate(BaseTask):
except PermissionDenied as exc:
logger.exception('License error saving {} content'.format(inventory_update.log_format))
raise PostRunError(str(exc), status='error')
except PostRunError:
logger.exception('Error saving {} content, rolling back changes'.format(inventory_update.log_format))
raise
except Exception:
logger.exception('Exception saving {} content, rolling back changes.'.format(
inventory_update.log_format))