File tree 1 file changed +13
-7
lines changed
1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -73,14 +73,18 @@ def validate(self, attrs):
73
73
74
74
75
75
class EmailAuthSerializer (AbstractBaseAliasAuthenticationSerializer ):
76
-
77
- alias_type = 'email'
76
+ @property
77
+ def alias_type (self ):
78
+ return 'email'
79
+
78
80
email = serializers .EmailField ()
79
81
80
82
81
83
class MobileAuthSerializer (AbstractBaseAliasAuthenticationSerializer ):
84
+ @property
85
+ def alias_type (self ):
86
+ return 'mobile'
82
87
83
- alias_type = 'mobile'
84
88
phone_regex = RegexValidator (regex = r'^\+?1?\d{9,15}$' ,
85
89
message = "Mobile number must be entered in the format:"
86
90
" '+999999999'. Up to 15 digits allowed." )
@@ -140,13 +144,15 @@ def validate(self, attrs):
140
144
141
145
142
146
class EmailVerificationSerializer (AbstractBaseAliasAuthenticationSerializer ):
143
-
144
- alias_type = 'email'
147
+ @property
148
+ def alias_type (self ):
149
+ return 'email'
145
150
146
151
147
152
class MobileVerificationSerializer (AbstractBaseAliasAuthenticationSerializer ):
148
-
149
- alias_type = 'mobile'
153
+ @property
154
+ def alias_type (self ):
155
+ return 'mobile'
150
156
151
157
152
158
"""
You can’t perform that action at this time.
0 commit comments