Skip to content

Commit

Permalink
Update jupyter_server/services/events/handlers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsailer authored Nov 4, 2024
1 parent d182961 commit 8c988dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jupyter_server/services/events/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def validate_model(
message = f"Missing `{key}` in the JSON request body."
raise Exception(message)
schema_id = cast(str, data.get("schema_id"))
# The case where a given schema_id isn't found,
# jupyter_events raises a useful error, so there's no need to
# handle that case here.
schema = registry.get(schema_id)
version = int(cast(int, data.get("version")))
if schema.version != version:
Expand Down

0 comments on commit 8c988dc

Please sign in to comment.