Skip to content

Commit

Permalink
fix(signal): get name from raw dictionary (#5597)
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 authored Dec 11, 2024
1 parent 1d35db1 commit ebf54c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dispatch/signal/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ def create_instance(
signal_instance.id = signal_instance_in.raw["id"]

if signal_instance.id and not is_valid_uuid(signal_instance.id):
msg = f"Invalid signal id format. Expecting UUIDv4 format. Signal id: {signal_instance.id}. Signal name/variant: {signal_instance.raw['name'] if signal_instance and signal_instance.raw and signal_instance.get('name') else signal_instance.raw['variant']}"
msg = f"Invalid signal id format. Expecting UUIDv4 format. Signal id: {signal_instance.id}. Signal name/variant: {signal_instance.raw['name'] if signal_instance and signal_instance.raw and signal_instance.raw.get('name') else signal_instance.raw['variant']}"
log.warn(msg)
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
Expand Down

0 comments on commit ebf54c9

Please sign in to comment.