Skip to content

Commit

Permalink
Merge pull request #429 from raun/master
Browse files Browse the repository at this point in the history
#369 Changed tickets ids instead of ticket numbers
  • Loading branch information
ChillarAnand committed Apr 23, 2016
2 parents b33d2cd + 0a8f09c commit 71dc669
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion junction/tickets/management/commands/sync_data.py
Expand Up @@ -20,14 +20,16 @@ class Command(BaseCommand):
"""
@transaction.atomic
def handle(self, *args, **options):
# to improve the testability of the class these object need to be initialized outside
# Write setters for it as well
api_token = settings.EXPLARA_API_TOKEN
e = Explara(api_token)
events = e.get_events()
orders = e.get_orders(events[0]['eventId'])

for order in orders:
for attendee in order.get('attendee'):
ticket_no = attendee.get('ticketNo')
ticket_no = attendee.get('ticketId')
defaults = {
'order_no': order.get('orderNo'),
'order_cost': order.get('orderCost'),
Expand Down

0 comments on commit 71dc669

Please sign in to comment.