Browse Source

Fix mail send error "Exception catched during email notification: 'Undefined' object has no attribute 'WEBSITE_TITLE'"

Bastien Sevajol (Algoo) 8 years ago
parent
commit
e14fb96a0d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      tracim/tracim/lib/notifications.py

+ 5 - 1
tracim/tracim/lib/notifications.py View File

@@ -370,6 +370,8 @@ class EmailNotifier(object):
370 370
             )
371 371
             raise ValueError('Unexpected empty notification')
372 372
 
373
+        # Import done here because cyclic import
374
+        from tracim.config.app_cfg import CFG
373 375
         body_content = template.render(
374 376
             base_url=self._global_config.WEBSITE_BASE_URL,
375 377
             _=_,
@@ -381,6 +383,8 @@ class EmailNotifier(object):
381 383
             content_text=content_text,
382 384
             main_title=main_title,
383 385
             call_to_action_text=call_to_action_text,
384
-            result = DictLikeClass(item=dictified_item, actor=dictified_actor))
386
+            result = DictLikeClass(item=dictified_item, actor=dictified_actor),
387
+            CFG=CFG.get_instance(),
388
+        )
385 389
 
386 390
         return body_content