takatost пре 1 година
родитељ
комит
94626487db
1 измењених фајлова са 3 додато и 4 уклоњено
  1. 3 4
      api/extensions/ext_mail.py

+ 3 - 4
api/extensions/ext_mail.py

@@ -23,10 +23,9 @@ class Mail:
                     raise ValueError('RESEND_API_KEY is not set')
                     raise ValueError('RESEND_API_KEY is not set')
                 
                 
                 api_url = app.config.get('RESEND_API_URL')
                 api_url = app.config.get('RESEND_API_URL')
-                if not api_url:
-                    raise ValueError('RESEND_API_URL is not set')
-                
-                resend.api_url = api_url
+                if api_url:
+                    resend.api_url = api_url
+
                 resend.api_key = api_key
                 resend.api_key = api_key
                 self._client = resend.Emails
                 self._client = resend.Emails
             else:
             else: