1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Drop as_dict() method from ChoiceSet

This commit is contained in:
jeremystretch
2021-12-16 10:22:05 -05:00
parent 124302908a
commit 1902ecb8ca
4 changed files with 3 additions and 13 deletions

View File

@@ -167,8 +167,8 @@ class Report(object):
"""
Log a message from a test method. Do not call this method directly; use one of the log_* wrappers below.
"""
if level not in LogLevelChoices.as_dict():
raise Exception("Unknown logging level: {}".format(level))
if level not in LogLevelChoices.values():
raise Exception(f"Unknown logging level: {level}")
self._results[self.active_test]['log'].append((
timezone.now().isoformat(),
level,