diff --git a/owrx/controllers/settings/__init__.py b/owrx/controllers/settings/__init__.py index a7ff055..510a265 100644 --- a/owrx/controllers/settings/__init__.py +++ b/owrx/controllers/settings/__init__.py @@ -78,10 +78,13 @@ class SettingsFormController(AuthorizationMixin, WebpageController, metaclass=AB data = parse_qs(self.get_body().decode("utf-8"), keep_blank_values=True) return {k: v for i in self.getSections() for k, v in i.parse(data).items()} + def getSuccessfulRedirect(self): + return self.request.path + def processFormData(self): self.processData(self.parseFormData()) self.store() - self.send_redirect(self.request.path) + self.send_redirect(self.getSuccessfulRedirect()) def processData(self, data): config = self.getData() diff --git a/owrx/controllers/settings/sdr.py b/owrx/controllers/settings/sdr.py index 447552f..88ec33e 100644 --- a/owrx/controllers/settings/sdr.py +++ b/owrx/controllers/settings/sdr.py @@ -197,6 +197,9 @@ class NewSdrDeviceController(SettingsFormController): config["sdrs"] = sdrs super().store() + def getSuccessfulRedirect(self): + return "{}settings/sdr/{}".format(self.get_document_root(), self.stack["id"]) + class SdrProfileController(SdrFormController): def __init__(self, handler, request, options):