uranusjr commented on code in PR #29433:
URL: https://github.com/apache/airflow/pull/29433#discussion_r1133576482


##########
airflow/api_connexion/endpoints/dataset_endpoint.py:
##########
@@ -143,7 +145,7 @@ def post_dataset_event(session: Session = NEW_SESSION) -> 
APIResponse:
     uri = json_body["dataset_uri"]
     external_source = request.remote_addr
     user_id = getattr(current_user, "id", None)
-    timestamp = json_body["timestamp"]
+    timestamp = json_body.get("timestamp").astimezone(timezone.utc)

Review Comment:
   This should use `[]` instead of `get()` unless you provide a non-None 
default.



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