Skip to content

Commit

Permalink
[PUI] infinite loop if classic frontend is disabled
Browse files Browse the repository at this point in the history
Fixes #8575
  • Loading branch information
matmair committed Dec 2, 2024
1 parent 8ac8527 commit 01abf4f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/backend/InvenTree/plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,13 @@ def package_install_name(self) -> [str, None]:
return self.check_package_install_name()

@property
def settings_url(self):
def settings_url(self) -> str:
"""URL to the settings panel for this plugin."""
if settings.ENABLE_CLASSIC_FRONTEND:
return f'{reverse("settings")}#select-plugin-{self.slug}'
config = self.plugin_config()
if config:
if config := self.db:
return InvenTree.helpers.pui_url(f'/settings/admin/plugin/{config.pk}/')
else:
return InvenTree.helpers.pui_url('/settings/admin/plugin/')
return InvenTree.helpers.pui_url('/settings/admin/plugin/')

# region package info
def _get_package_commit(self):
Expand Down

0 comments on commit 01abf4f

Please sign in to comment.