Skip to content

Commit

Permalink
AVB-759: Add ticket.aisle field
Browse files Browse the repository at this point in the history
  • Loading branch information
samulenti committed Jun 6, 2024
1 parent 85b202b commit 039dad0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 10 additions & 5 deletions livestyled/models/ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def __init__(
additional_fields=[],
printed=True,
timezone=None,
ticket_type='ticket'
ticket_type='ticket',
aisle=None,
):
self.id = id
self.external_ticket_id = external_ticket_id
Expand Down Expand Up @@ -172,6 +173,7 @@ def __init__(
self.printed = printed
self.timezone = timezone
self.ticket_type = ticket_type
self.aisle = aisle

@classmethod
def placeholder(
Expand Down Expand Up @@ -228,7 +230,8 @@ def placeholder(
additional_fields=[],
printed=True,
timezone=None,
ticket_type='ticket'
ticket_type='ticket',
aisle=None,
)

@classmethod
Expand Down Expand Up @@ -280,7 +283,8 @@ def create_new(
additional_fields=None,
printed=True,
timezone=None,
ticket_type='ticket'
ticket_type='ticket',
aisle=None,
):
if additional_fields is None:
additional_fields = []
Expand Down Expand Up @@ -334,7 +338,8 @@ def create_new(
additional_fields=additional_fields,
printed=printed,
timezone=timezone,
ticket_type=ticket_type
ticket_type=ticket_type,
aisle=aisle,
)
if isinstance(user, (str, int)):
user = User.placeholder(id=user)
Expand Down Expand Up @@ -403,7 +408,7 @@ def diff(self, existing):
'redeemer_email', 'parent_ticket', 'shared_at', 'legal_long_text', 'legal_short_text', 'map_url',
'map_image_url', 'ticket_integration', 'entrance', 'row', 'section', 'price_code', 'price_type',
'external_customer_ref', 'venue', 'event', 'event_date', 'currency', 'external_card_ref',
'additional_fields', 'printed', 'timezone', 'ticket_type'
'additional_fields', 'printed', 'timezone', 'ticket_type', 'aisle'
)
for field in fields:
current = getattr(existing, field)
Expand Down
1 change: 1 addition & 0 deletions livestyled/schemas/ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ class Meta:
printed = fields.Boolean(allow_none=True, required=False, missing=True)
timezone = fields.String(allow_none=True, required=False, missing=None)
ticket_type = fields.String(data_key='ticketType', required=False, allow_none=False)
aisle = fields.String(data_key='aisle', required=False, allow_none=False)

0 comments on commit 039dad0

Please sign in to comment.