Skip to content

Commit

Permalink
cast tuple to list for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
k-macmillan committed Oct 30, 2024
1 parent 54ea917 commit 4b8f07e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,13 @@ def validate_schema(
):
if 'callback_type' in data and 'notification_statuses' in data:
if data['callback_type'] != DELIVERY_STATUS_CALLBACK_TYPE and data['notification_statuses'] is not None:
raise ValidationError(f"Callback type {data['callback_type']} should not have notification statuses")
raise ValidationError(
f"Callback type {list(data['callback_type'])} should not have notification statuses"
)

if 'callback_channel' in data and 'bearer_token' not in data:
if data['callback_channel'] == 'webhook':
raise ValidationError(f"Callback channel {data['callback_channel']} should have bearer_token")
raise ValidationError(f"Callback channel {list(data['callback_channel'])} should have bearer_token")

@validates('callback_channel')
def validate_callback_channel(
Expand Down

0 comments on commit 4b8f07e

Please sign in to comment.