Skip to content

Commit

Permalink
Fix missing key reference
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanJField committed Mar 12, 2024
1 parent 040c45c commit c8c8925
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions data_management/rest/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,12 @@ def auth_provider(request):
def auth_url(request):
"""Returns Auth Provider URL in Json Format"""
auth_url = None
if conf_settings.SOCIAL_AUTH_GITLAB_API_URL:
auth_url = conf_settings.SOCIAL_AUTH_GITLAB_API_URL
elif conf_settings.AUTH_METHOD == 'GitLab':
if hasattr(conf_settings, 'SOCIAL_AUTH_GITLAB_API_URL'):
if conf_settings.SOCIAL_AUTH_GITLAB_API_URL:
auth_url = conf_settings.SOCIAL_AUTH_GITLAB_API_URL
if conf_settings.AUTH_METHOD == 'GitLab' and not auth_url:
auth_url = "https://gitlab.com"
elif conf_settings.AUTH_METHOD == 'GitHub':
if conf_settings.AUTH_METHOD == 'GitHub' and not auth_url:
auth_url = "https://github.com"
_data = {
"auth_url":auth_url
Expand Down

0 comments on commit c8c8925

Please sign in to comment.