Skip to content

Commit

Permalink
Minor refactor of confirmation email
Browse files Browse the repository at this point in the history
  • Loading branch information
aviupadhyayula committed Nov 23, 2024
1 parent 64270fa commit 1f7cdfe
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions backend/clubs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1924,8 +1924,6 @@ def send_confirmation_email(self):
"""
Send a confirmation email to the ticket owner after purchase
"""
owner = self.owner

output = BytesIO()
qr_image = self.get_qr()
qr_image.save(output, format="PNG")
Expand All @@ -1943,9 +1941,9 @@ def send_confirmation_email(self):
if self.owner.email:
send_mail_helper(
name="ticket_confirmation",
subject=f"Ticket confirmation for {owner.get_full_name()}"
subject=f"Ticket confirmation for {self.owner.get_full_name()}"
f" to {self.event.name}",
emails=[owner.email],
emails=[self.owner.email],
context=context,
attachment={
"filename": "qr_code.png",
Expand Down

0 comments on commit 1f7cdfe

Please sign in to comment.