Procházet zdrojové kódy

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

Damien ACCORSI před 10 roky
rodič
revize
c35227b6ef
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      tracim/tracim/lib/notifications.py

+ 1 - 1
tracim/tracim/lib/notifications.py Zobrazit soubor

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')