Skip to content

Commit

Permalink
fix: credentials initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcanay committed Sep 16, 2024
1 parent 825a907 commit bc8e17d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def init_credentials():
# If not set, load the environment file. Then, check if the values are set in the environment file
if not admin_username or not admin_password:
load_dotenv()
if os.getenv("PDATAVIEWER_ADMIN_USERNAME") and os.getenv(
"PDATAVIEWER_ADMIN_PASSWORD"
):
return True
if os.getenv("PDATAVIEWER_ADMIN_USERNAME") and os.getenv(
"PDATAVIEWER_ADMIN_PASSWORD"
):
return True
else:
raise HTTPException(status_code=500, detail="Missing admin credentials")

Expand Down

0 comments on commit bc8e17d

Please sign in to comment.