forked from DGNum/stateless-uptime-kuma
fix: tag synchronisation again
This commit is contained in:
parent
8e32135aaa
commit
c6baf60295
1 changed files with 3 additions and 1 deletions
|
@ -138,9 +138,11 @@ class Monitor(Item):
|
|||
(i["tag_id"], i["value"]) for i in self.api.get_monitor(self.id)["tags"]
|
||||
)
|
||||
for t, v in self.tags:
|
||||
if v is None:
|
||||
v = ""
|
||||
if (t.id, v) not in current_tags:
|
||||
logger.debug(f"Adding tag: '{t}, {v}'")
|
||||
self.api.add_monitor_tag(tag_id=t.id, monitor_id=self.id, value=v if v is not None else "")
|
||||
self.api.add_monitor_tag(tag_id=t.id, monitor_id=self.id, value=v)
|
||||
self.saved = True
|
||||
|
||||
def __repr__(self):
|
||||
|
|
Loading…
Reference in a new issue