Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENG-6700] Check and fix website tests #10850

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from addons.osfstorage.models import Region, OsfStorageFile

from osf import features, exceptions
from osf.models import Guid, Preprint, AbstractNode, Node, DraftNode, Registration, BaseFileNode
from osf.models import Guid, Preprint, AbstractNode, Node, DraftNode, Registration, BaseFileNode, VersionedGuidMixin

from website.settings import EXTERNAL_EMBER_APPS, PROXY_EMBER_APPS, EXTERNAL_EMBER_SERVER_TIMEOUT, DOMAIN
from website.ember_osf_web.decorators import ember_flag_is_active
Expand Down Expand Up @@ -295,7 +295,7 @@ def resolve_guid(guid, suffix=None):
if not resource:
raise HTTPError(http_status.HTTP_404_NOT_FOUND)

if not guid == resource._id:
if issubclass(resource.__class__, VersionedGuidMixin) and guid != resource._id:
cslzchen marked this conversation as resolved.
Show resolved Hide resolved
return redirect(f'/{resource._id}/{suffix}' if suffix else f'/{resource._id}/', code=302)

if not resource or not resource.deep_url:
cslzchen marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading