ferruzzi commented on code in PR #64926:
URL: https://github.com/apache/airflow/pull/64926#discussion_r3090240161


##########
airflow-core/src/airflow/serialization/encoders.py:
##########
@@ -211,6 +211,7 @@ def encode_deadline_alert(d: DeadlineAlert | 
SerializedDeadlineAlert) -> dict[st
     from airflow.sdk.serde import serialize
 
     return {
+        "name": getattr(d, "name", None),

Review Comment:
   Nit:  I think this works how you have it (presumably you've tested this 
manually?) but based on the other values in this dict,, I'm pretty sure this 
can/should be 
   ```suggestion
           "name": d.name,
   ```
   
   Also, not for this PR but I suppose we could have used the 
DeadlineAlertFields.NAME, etc constants for the keys here like we did in the 
decoder to make sure they stay in sync.  But that's not your problem for this 
PR.



-- 
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]

Reply via email to