mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 00:56:34 +03:00
Remove redundant required=True
from serializer fields
This commit is contained in:
parent
9df9608631
commit
5bcf31f545
|
@ -123,8 +123,8 @@ class RegisterSerializer(serializers.Serializer):
|
|||
required=allauth_settings.USERNAME_REQUIRED
|
||||
)
|
||||
email = serializers.EmailField(required=allauth_settings.EMAIL_REQUIRED)
|
||||
password1 = serializers.CharField(required=True, write_only=True)
|
||||
password2 = serializers.CharField(required=True, write_only=True)
|
||||
password1 = serializers.CharField(write_only=True)
|
||||
password2 = serializers.CharField(write_only=True)
|
||||
|
||||
def validate_username(self, username):
|
||||
username = get_adapter().clean_username(username)
|
||||
|
|
|
@ -10,8 +10,8 @@ if 'allauth.socialaccount' in settings.INSTALLED_APPS:
|
|||
|
||||
|
||||
class TwitterLoginSerializer(serializers.Serializer):
|
||||
access_token = serializers.CharField(required=True)
|
||||
token_secret = serializers.CharField(required=True)
|
||||
access_token = serializers.CharField()
|
||||
token_secret = serializers.CharField()
|
||||
|
||||
def _get_request(self):
|
||||
request = self.context.get('request')
|
||||
|
|
Loading…
Reference in New Issue
Block a user