aminghadersohi commented on code in PR #40693:
URL: https://github.com/apache/superset/pull/40693#discussion_r3357333790
##########
superset/reports/notifications/email.py:
##########
@@ -83,7 +83,16 @@ class EmailNotification(BaseNotification): # pylint:
disable=too-few-public-met
"""
type = ReportRecipientType.EMAIL
- now = datetime.now(timezone("UTC"))
+
+ def __init__(
+ self, recipient: ReportRecipients, content: NotificationContent
+ ) -> None:
+ super().__init__(recipient, content)
+ # Stamp the notification's creation time once, at send time, so the
date
Review Comment:
NIT: `self.now` is stamped in `__init__` (construction time), not in
`send()`. If `send()` is called after a delay the subject date reflects
instantiation time, not actual send time. The last two lines of the comment
also describe the old behavior — that context belongs in the commit message
rather than the code.
--
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]