From 8b24b2851a6161fac861b1c28af27439c2ee568a Mon Sep 17 00:00:00 2001 From: sysfaray Date: Wed, 19 May 2021 12:24:40 +0300 Subject: [PATCH] Fix ThresholdProfile to JSON --- pm/models/thresholdprofile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pm/models/thresholdprofile.py b/pm/models/thresholdprofile.py index 7a289a6aaa..93eb5fb4c3 100644 --- a/pm/models/thresholdprofile.py +++ b/pm/models/thresholdprofile.py @@ -1,7 +1,7 @@ # ---------------------------------------------------------------------- # ThresholdProfile model # ---------------------------------------------------------------------- -# Copyright (C) 2007-2020 The NOC Project +# Copyright (C) 2007-2021 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- @@ -184,12 +184,12 @@ class ThresholdProfile(Document): "$collection": self._meta["json_collection"], "uuid": str(self.uuid), "description": self.description, - "umbrella_filter_handler": self.umbrella_filter_handler, + "umbrella_filter_handler": str(self.umbrella_filter_handler.id), "window_type": self.window_type, "window": self.window, "window_function": self.window_function, "window_config": self.window_config, - "value_handler": self.value_handler, + "value_handler": str(self.value_handler.id), "thresholds": [thrh.to_json() for thrh in self.thresholds], }, order=["name", "uuid", "thresholds"], -- GitLab