Skip to content

Commit

Permalink
add None check for clean_suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
adlius committed Feb 7, 2024
1 parent 22093f5 commit d73e8b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def resolve_guid(guid, suffix=None):
elif isinstance(resource, Registration) and (clean_suffix in ('', 'comments', 'links', 'components', 'resources',)) and waffle.flag_is_active(request, features.EMBER_REGISTRIES_DETAIL_PAGE):
return use_ember_app()

elif isinstance(resource, Registration) and clean_suffix.startswith('metadata') and waffle.flag_is_active(request, features.EMBER_REGISTRIES_DETAIL_PAGE):
elif isinstance(resource, Registration) and clean_suffix and clean_suffix.startswith('metadata') and waffle.flag_is_active(request, features.EMBER_REGISTRIES_DETAIL_PAGE):
return use_ember_app()

elif isinstance(resource, Registration) and (clean_suffix in ('files', 'files/osfstorage')) and waffle.flag_is_active(request, features.EMBER_REGISTRATION_FILES):
Expand All @@ -348,7 +348,7 @@ def resolve_guid(guid, suffix=None):
elif isinstance(resource, Node) and clean_suffix and any(path.startswith(clean_suffix) for path in addon_paths) and waffle.flag_is_active(request, features.EMBER_PROJECT_FILES):
return use_ember_app()

elif isinstance(resource, Node) and clean_suffix and clean_suffix.startswith('metadata') and waffle.flag_is_active(request, features.EMBER_PROJECT_FILES):
elif isinstance(resource, Node) and clean_suffix and clean_suffix.startswith('metadata'):
return use_ember_app()

elif isinstance(resource, BaseFileNode) and resource.is_file and not isinstance(resource.target, Preprint):
Expand Down

0 comments on commit d73e8b5

Please sign in to comment.