Skip to content

Commit

Permalink
Fix ClaimUser view to support versioned preprint
Browse files Browse the repository at this point in the history
  • Loading branch information
cslzchen committed Jan 10, 2025
1 parent 8bc1b00 commit 3feb1d2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,8 @@ def post(self, request, *args, **kwargs):
if claimed_user.is_disabled:
raise ValidationError('Cannot claim disabled account.')

try:
record_referent = Guid.objects.get(_id=record_id).referent
except Guid.DoesNotExist:
record_referent, _ = Guid.load_referent(record_id)
if not record_referent:
raise NotFound('Unable to find specified record.')

try:
Expand Down

0 comments on commit 3feb1d2

Please sign in to comment.