Skip to content

Commit

Permalink
send meal upgrade criteria update #239
Browse files Browse the repository at this point in the history
send meal upgrade criteria update
  • Loading branch information
connorkm2 authored Nov 8, 2024
2 parents b9aaf21 + 3fea541 commit 22c9233
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion functions/import_tickets/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,10 @@ def lambda_handler(event, context):
input = {k: v for k, v in input.items() if v is not None}

respone = attendees_table.put_item(Item=input)
send_meal_upgrade = True if options.get('sendMealUpgrade', False) and access_array[2] == 0 else False

if (options['sendTicketEmails'] == "everyone") or (options['sendTicketEmails'] == "new" and not str(attendee['ticket_number'])) or (options.get('sendMealUpgrade', False)):
send_email(attendee['name'], attendee['email'], ticket_number, line_items, options.get('sendMealUpgrade', False), meal_upgrade_base_link, pass_type)
send_email(attendee['name'], attendee['email'], ticket_number, line_items, send_meal_upgrade, meal_upgrade_base_link, pass_type)

except (ValueError, KeyError, boto3.exceptions.Boto3Error) as e:
logger.error(f"Failed to process attendee: {attendee}")
Expand Down

0 comments on commit 22c9233

Please sign in to comment.