Skip to content

Commit 29697c3

Browse files
committed
fixup
1 parent 8adc4f3 commit 29697c3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/argus/notificationprofile/models.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,13 @@ class Meta:
183183
def __str__(self):
184184
if self.label:
185185
return self.label
186-
if isinstance(self.settings, str):
187-
settings = self.settings
188186
if isinstance(self.settings, dict):
189187
settings = str(list(self.settings.values()))
188+
elif isinstance(self.settings, str):
189+
# This is due to transmogrifying what is in settings on the
190+
# form/obj and is dangerous. Should go away when validating with
191+
# forms.
192+
settings = self.settings
190193
else:
191194
settings = str(self.settings)
192195
LOG.warn("WTF, this should be a dict (%s)", settings)

0 commit comments

Comments
 (0)