mirror of
				https://github.com/Tivix/django-rest-auth.git
				synced 2025-10-30 23:37:32 +03:00 
			
		
		
		
	update for accept login users of CustomUserModel objects where doesn't exist username field and setted USERNAME_FIELD property
This commit is contained in:
		
							parent
							
								
									7c8a34f700
								
							
						
					
					
						commit
						cc9552adda
					
				|  | @ -81,7 +81,7 @@ class LoginSerializer(serializers.Serializer): | |||
|             # Authentication without using allauth | ||||
|             if email: | ||||
|                 try: | ||||
|                     username = UserModel.objects.get(email__iexact=email).username | ||||
|                     username = UserModel.objects.get(email__iexact=email).get_username() | ||||
|                 except UserModel.DoesNotExist: | ||||
|                     pass | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user