File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
styleguide_example/blog_examples/admin_2fa Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -41,3 +41,7 @@ ignore_missing_imports = True
41
41
[mypy-oauthlib.*]
42
42
# Remove this when oauthlib stubs are present
43
43
ignore_missing_imports = True
44
+
45
+ [mypy-qrcode.*]
46
+ # Remove this when qrcode stubs are present
47
+ ignore_missing_imports = True
Original file line number Diff line number Diff line change 1
1
import pyotp
2
- from django .contrib .auth import get_user_model
3
2
from django .core .exceptions import ValidationError
4
3
5
- from . models import UserTwoFactorAuthData
4
+ from styleguide_example . users . models import BaseUser
6
5
7
- User = get_user_model ()
6
+ from . models import UserTwoFactorAuthData
8
7
9
8
10
- def user_two_factor_auth_data_create (* , user : User ) -> UserTwoFactorAuthData :
9
+ def user_two_factor_auth_data_create (* , user : BaseUser ) -> UserTwoFactorAuthData :
11
10
if hasattr (user , "two_factor_auth_data" ):
12
11
raise ValidationError ("Can not have more than one 2FA related data." )
13
12
You can’t perform that action at this time.
0 commit comments