Handle the net being None or 'None'

Mark Veidemanis 2 years ago
parent e4fad1e7bc
commit 65fddc5fe9
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

@ -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…
Cancel
Save