Skip to content

Commit

Permalink
Merge pull request #8 from langtech-bsc/fix_int_parse
Browse files Browse the repository at this point in the history
Fix SMTP_PORT parse if env var empty
  • Loading branch information
PaulNdrei authored Dec 4, 2024
2 parents 8c2f844 + b170c35 commit bd764c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/galtea/users/user_mail_notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class UserEmailNotifier:
def __init__(self):
self.smtp_server = os.getenv("SMTP_SERVER")
self.smtp_user = os.getenv("SMTP_USER")
self.smtp_port = int(os.getenv("SMTP_PORT", default=465))
self.smtp_port = int(os.getenv("SMTP_PORT") or 465)
self.smtp_password = os.getenv("SMTP_PASSWORD")
self.sender_email = os.getenv("SMTP_SENDER_EMAIL")

Expand Down
2 changes: 1 addition & 1 deletion tests/stubs/users.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[
{"first_name": "John", "last_name": "Doe", "email": "andreipetrea3+12345@gmail.com", "role": "annotator"}
{"first_name": "John", "last_name": "Doe", "email": "test@test.com", "role": "annotator"}
]

0 comments on commit bd764c0

Please sign in to comment.