diff --git a/api/users/views.py b/api/users/views.py index f3bbfc172cf..f67babc667e 100644 --- a/api/users/views.py +++ b/api/users/views.py @@ -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: