We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e3277f commit b27a5b7Copy full SHA for b27a5b7
openwisp_radius/counters/base.py
@@ -25,13 +25,14 @@ def reply_names(self):
25
# BACKWARD COMPATIBILITY: In previous versions of openwisp-radius,
26
# the Counter.reply_name was a string instead of a tuple. Thus,
27
# we need to convert it to a tuple if it's a string.
28
- if not hasattr(self, "reply_name"):
+ reply_name = getattr(self, "reply_name", None)
29
+ if not reply_name:
30
raise NotImplementedError(
31
"Counter classes must define 'reply_names' property."
32
)
- if isinstance(self.reply_name, str):
33
- return (self.reply_name,)
34
- return self.reply_name
+ if isinstance(reply_name, str):
+ return (reply_name,)
35
+ return reply_name
36
37
@property
38
@abstractmethod
0 commit comments