Skip to content
This repository was archived by the owner on May 26, 2020. It is now read-only.

Commit 3f951c2

Browse files
committed
Changed potentially misleading error message
1 parent 477d588 commit 3f951c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rest_framework_jwt/serializers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ def validate(self, attrs):
6868
msg = 'Unable to login with provided credentials.'
6969
raise serializers.ValidationError(msg)
7070
else:
71-
msg = 'Must include "username" and "password"'
71+
msg = 'Must include "{0}" and "{1}"'.format(
72+
self.username_field,
73+
'password'
74+
)
7275
raise serializers.ValidationError(msg)
7376

7477

0 commit comments

Comments
 (0)