diff --git a/account/serializers.py b/account/serializers.py index 5c376803..4b3285ab 100644 --- a/account/serializers.py +++ b/account/serializers.py @@ -69,16 +69,15 @@ class SSOSerializer(serializers.Serializer): class EditUserProfileSerializer(serializers.Serializer): - avatar = serializers.CharField(max_length=50, required=False, default=None) blog = serializers.URLField(required=False, allow_blank=True, default='') - mood = serializers.CharField(max_length=60, required=False, default='') + mood = serializers.CharField(max_length=60, required=False, allow_blank=True, default='') hduoj_username = serializers.CharField(max_length=30, required=False, allow_blank=True, default='') bestcoder_username = serializers.CharField(max_length=30, required=False, allow_blank=True, default='') codeforces_username = serializers.CharField(max_length=30, required=False, allow_blank=True, default='') school = serializers.CharField(max_length=200, required=False, allow_blank=True, default='') phone_number = serializers.CharField(max_length=15, required=False, allow_blank=True, default='') - student_id = serializers.CharField(max_length=15, required=False, default="") + student_id = serializers.CharField(max_length=15, required=False, allow_blank=True, default="") class UserProfileSerializer(serializers.ModelSerializer): diff --git a/template/src/oj/account/settings.html b/template/src/oj/account/settings.html index e6436bb5..faee8aad 100644 --- a/template/src/oj/account/settings.html +++ b/template/src/oj/account/settings.html @@ -92,6 +92,11 @@
+