eschutho commented on code in PR #26327:
URL: https://github.com/apache/superset/pull/26327#discussion_r1460114158


##########
superset/commands/report/execute.py:
##########
@@ -377,16 +378,21 @@ def _get_notification_content(self) -> 
NotificationContent:
         ):
             embedded_data = self._get_embedded_data()
 
-        if self._report_schedule.chart:
-            name = (
-                f"{self._report_schedule.name}: "
-                f"{self._report_schedule.chart.slice_name}"
-            )
+        if not self._report_schedule.email_subject:
+            if self._report_schedule.chart:
+                name = (
+                    f"{prefix} "
+                    f"{self._report_schedule.name}: "
+                    f"{self._report_schedule.chart.slice_name}"
+                )
+            else:
+                name = (
+                    f"{prefix} "
+                    f"{self._report_schedule.name}: "
+                    f"{self._report_schedule.dashboard.dashboard_title}"
+                )
         else:
-            name = (
-                f"{self._report_schedule.name}: "
-                f"{self._report_schedule.dashboard.dashboard_title}"
-            )
+            name = self._report_schedule.email_subject

Review Comment:
   Thanks for pointing that out. You're correct. Maybe just a small nit for 
readability, I would switch the logic to 
   ````
   if self._report_schedule.email_subject:
       name = self._report_schedule.email_subject
   else:
   ...
   ```
   I also left a separate comment about persisting the app.config prefix.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to