Skip to content

Commit

Permalink
Fix handling of missing parent header in record activity (#1498)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart authored Feb 12, 2025
1 parent 5ef77a3 commit 641e8fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jupyter_server/services/kernels/kernelmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,8 @@ def record_activity(msg_list):
msg = session.deserialize(fed_msg_list, content=False)

msg_type = msg["header"]["msg_type"]
parent_msg_type = msg.get("parent_header", {}).get("msg_type", None)
parent_header = msg.get("parent_header")
parent_msg_type = None if parent_header is None else parent_header.get("msg_type")
if (
self.track_message_type(msg_type)
or self.track_message_type(parent_msg_type)
Expand Down

0 comments on commit 641e8fc

Please sign in to comment.