Browse Source

serialize filename as label when no label setup for a file in email notifcations

Damien ACCORSI 10 years ago
parent
commit
c35227b6ef
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tracim/tracim/lib/notifications.py

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

141
             subject = self._global_config.EMAIL_NOTIFICATION_CONTENT_UPDATE_SUBJECT
141
             subject = self._global_config.EMAIL_NOTIFICATION_CONTENT_UPDATE_SUBJECT
142
             subject = subject.replace(EST.WEBSITE_TITLE, self._global_config.WEBSITE_TITLE.__str__())
142
             subject = subject.replace(EST.WEBSITE_TITLE, self._global_config.WEBSITE_TITLE.__str__())
143
             subject = subject.replace(EST.WORKSPACE_LABEL, content.workspace.label.__str__())
143
             subject = subject.replace(EST.WORKSPACE_LABEL, content.workspace.label.__str__())
144
-            subject = subject.replace(EST.CONTENT_LABEL, content.label.__str__())
144
+            subject = subject.replace(EST.CONTENT_LABEL, content.label.__str__() if content.label else content.file_name.__str__())
145
             subject = subject.replace(EST.CONTENT_STATUS_LABEL, content.get_status().label.__str__())
145
             subject = subject.replace(EST.CONTENT_STATUS_LABEL, content.get_status().label.__str__())
146
 
146
 
147
             message = MIMEMultipart('alternative')
147
             message = MIMEMultipart('alternative')