Skip to content

Commit

Permalink
Merge pull request #10909 from cslzchen/feature/fix-claim-user-api
Browse files Browse the repository at this point in the history
[ENG-6883] Fix ClaimUser view to support versioned preprint
  • Loading branch information
cslzchen authored Jan 10, 2025
2 parents 8bc1b00 + 3feb1d2 commit 5eb448c
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 5eb448c

Please sign in to comment.