Skip to content

Commit

Permalink
Bug Fix for Issue #1080 (#1085)
Browse files Browse the repository at this point in the history
* Updated controller decorator code to treat user_media, app_media, app_resources, app_public the same as app and user workspace, fixes issue #1080

* removed breakpoints

* black formatting
  • Loading branch information
jakeymac authored Aug 27, 2024
1 parent 6ba7815 commit fbf295d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tethys_apps/base/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,10 @@ def wrapped(function_or_class):
handler_type=_handler_type,
app_workspace=app_workspace,
user_workspace=user_workspace,
user_media=user_media,
app_media=app_media,
app_public=app_public,
app_resources=app_resources,
)

if inspect.isclass(function_or_class):
Expand Down Expand Up @@ -637,6 +641,10 @@ def _get_url_map_kwargs_list(
handler_type: str = None,
app_workspace=False,
user_workspace=False,
user_media=False,
app_media=False,
app_public=False,
app_resources=False,
):
final_urls = []
if url is not None:
Expand Down Expand Up @@ -669,6 +677,10 @@ def _get_url_map_kwargs_list(
for condition in [
app_workspace,
user_workspace,
user_media,
app_media,
app_public,
app_resources,
]: # note order of list is important
if condition:
arg = list(parameters.keys())[1]
Expand Down

0 comments on commit fbf295d

Please sign in to comment.