mirror of
https://github.com/ansible/awx.git
synced 2026-02-15 10:10:01 -03:30
fix a few activity stream bugs related to setting creation/update
* when a setting is created, only create *one* activity stream record for the creation, not one for create and another for update (similar to https://github.com/ansible/tower/pull/53) * add code to hide `$encrypted$` activity stream content see: https://github.com/ansible/ansible-tower/issues/7320
This commit is contained in:
@@ -65,8 +65,10 @@ class Setting(CreatedModifiedModel):
|
||||
# After saving a new instance for the first time, set the encrypted
|
||||
# field and save again.
|
||||
if encrypted and new_instance:
|
||||
self.value = self._saved_value
|
||||
self.save(update_fields=['value'])
|
||||
from awx.main.signals import disable_activity_stream
|
||||
with disable_activity_stream():
|
||||
self.value = self._saved_value
|
||||
self.save(update_fields=['value'])
|
||||
|
||||
@classmethod
|
||||
def get_cache_key(self, key):
|
||||
|
||||
Reference in New Issue
Block a user