Skip to content

Commit 74fa6cd

Browse files
Merge pull request #107 from nickspacek/fixes-optional-socialaccount
Adds check for optional deps in INSTALLED_APPS
2 parents d25df33 + 0ae9770 commit 74fa6cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rest_auth/registration/serializers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
# Import is needed only if we are using social login, in which
55
# case the allauth.socialaccount will be declared
66
try:
7+
apps.get_app_config('allauth.socialaccount')
78
from allauth.socialaccount.helpers import complete_social_login
9+
except LookupError:
10+
pass
811
except ImportError:
912
pass
1013

0 commit comments

Comments
 (0)