Handle the net being None or 'None'
This commit is contained in:
parent
e4fad1e7bc
commit
65fddc5fe9
|
@ -400,9 +400,11 @@ class ThresholdIRCActionsRegistration(SuperUserRequiredMixin, APIView):
|
|||
"""
|
||||
Get registration modal
|
||||
"""
|
||||
unreg = threshold.irc_get_unreg(net)
|
||||
message = None
|
||||
message_class = None
|
||||
if net == "None":
|
||||
net = None
|
||||
unreg = threshold.irc_get_unreg(net)
|
||||
if not unreg:
|
||||
message = "Could not get registration status."
|
||||
message_class = "danger"
|
||||
|
@ -428,6 +430,8 @@ class ThresholdIRCActionsRegistration(SuperUserRequiredMixin, APIView):
|
|||
"""
|
||||
message = None
|
||||
message_class = None
|
||||
if net == "None":
|
||||
net = None
|
||||
if request.resolver_match.url_name == "threshold_irc_actions_registration_net":
|
||||
template_name = "manage/threshold/irc/network/actions.html"
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue