Skip to content

Commit ec1d781

Browse files
committed
Tests
1 parent e44dcef commit ec1d781

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drfpasswordless/serializers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def validate(self, attrs):
249249
try:
250250
alias_type, alias = self.validate_alias(attrs)
251251
user_id = self.context.get("user_id")
252-
user = User.objects.get(**{'pk': user_id, alias_type: alias})
252+
user = User.objects.get(**{'id': user_id, alias_type: alias})
253253
callback_token = attrs.get('token', None)
254254

255255
token = CallbackToken.objects.get(**{'user': user,
@@ -270,7 +270,7 @@ def validate(self, attrs):
270270
logger.debug("drfpasswordless: User token mismatch when verifying alias.")
271271

272272
except CallbackToken.DoesNotExist:
273-
msg = _('We could not verify this token.')
273+
msg = _('We could not verify this alias.')
274274
logger.debug("drfpasswordless: Tried to validate alias with bad token.")
275275
pass
276276
except User.DoesNotExist:

0 commit comments

Comments
 (0)