mirror of https://github.com/MISP/MISP
fix: [misp-retention] use update_tag
parent
fc17041f35
commit
bc50458c06
|
@ -87,7 +87,8 @@ class misphelper(object):
|
||||||
# set expiredTag to hidden if it was accidentally enabled by "enable all"
|
# set expiredTag to hidden if it was accidentally enabled by "enable all"
|
||||||
if tag["tag"] == self.expiredTag:
|
if tag["tag"] == self.expiredTag:
|
||||||
if tag["existing_tag"]["Tag"]["hide_tag"] is False:
|
if tag["existing_tag"]["Tag"]["hide_tag"] is False:
|
||||||
self.misp.edit_tag(tag["existing_tag"]["Tag"]["id"], hide_tag=True)
|
tag["existing_tag"]["Tag"]["hide_tag"] = True
|
||||||
|
self.misp.update_tag(tag["existing_tag"]["Tag"])
|
||||||
else:
|
else:
|
||||||
raise Exception("Could not parse retention time/unit from tag: '{}'.".format(tag["tag"]))
|
raise Exception("Could not parse retention time/unit from tag: '{}'.".format(tag["tag"]))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue