Skip to content

Commit

Permalink
Import settings correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisRayM committed Sep 30, 2022
1 parent 2abab42 commit 2b1e752
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kpi/utils/ona_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def get_api_token(json_web_token):
try:
jwt_payload = jwt.decode(
json_web_token,
settings.get("JWT_SECRET_KEY", ""),
algorithms=[settings.get("JWT_ALGORITHM", "HS256")]
getattr(settings, "JWT_SECRET_KEY", ""),
algorithms=[getattr(settings, "JWT_ALGORITHM", "HS256")]
)

api_token = Token.objects.using("kobocat").select_related('user').get(
Expand Down
2 changes: 1 addition & 1 deletion kpi/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


def home(request):
return HttpResponseRedirect(settings.get("ONADATA_HOME"))
return HttpResponseRedirect(getattr("ONADATA_HOME", "https://onadata.com"))


def browser_tests(request):
Expand Down

0 comments on commit 2b1e752

Please sign in to comment.