We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0041530 + cc963ca commit 7c8a34fCopy full SHA for 7c8a34f
rest_auth/registration/serializers.py
@@ -14,13 +14,13 @@
14
from requests.exceptions import HTTPError
15
# Import is needed only if we are using social login, in which
16
# case the allauth.socialaccount will be declared
17
-try:
18
- from allauth.socialaccount.helpers import complete_social_login
19
-except ImportError:
20
- raise ImportError('allauth.socialaccount needs to be installed.')
21
22
-if 'allauth.socialaccount' not in settings.INSTALLED_APPS:
23
- raise ImportError('allauth.socialaccount needs to be added to INSTALLED_APPS.')
+if 'allauth.socialaccount' in settings.INSTALLED_APPS:
+ try:
+ from allauth.socialaccount.helpers import complete_social_login
+ except ImportError:
+ pass
+
24
25
26
class SocialLoginSerializer(serializers.Serializer):
0 commit comments