Revert "Don't update tags every time"
This reverts commit e77322c179.
Change-Id: Ida826a2aa888beeb76dbe657b2ccd6cb088157ed
This commit is contained in:
@@ -31,12 +31,12 @@ class SchemaBasedModel(warlock.Model):
|
||||
"""
|
||||
|
||||
def _make_custom_patch(self, new, original):
|
||||
if 'tags' in new and 'tags' not in original:
|
||||
if not self.get('tags'):
|
||||
tags_patch = []
|
||||
else:
|
||||
tags_patch = [{"path": "/tags",
|
||||
"value": self.get('tags'),
|
||||
"op": "replace"}]
|
||||
else:
|
||||
tags_patch = []
|
||||
|
||||
patch_string = jsonpatch.make_patch(original, new).to_string()
|
||||
patch = json.loads(patch_string)
|
||||
@@ -55,6 +55,9 @@ class SchemaBasedModel(warlock.Model):
|
||||
if (name not in original and name in new and
|
||||
prop.get('is_base', True)):
|
||||
original[name] = None
|
||||
|
||||
original['tags'] = None
|
||||
new['tags'] = None
|
||||
return self._make_custom_patch(new, original)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user