Skip to content

Instantly share code, notes, and snippets.

@harshvb7
Last active March 21, 2019 09:54
Show Gist options
  • Save harshvb7/76606a9497373cadbd3aec9584f75e03 to your computer and use it in GitHub Desktop.
Save harshvb7/76606a9497373cadbd3aec9584f75e03 to your computer and use it in GitHub Desktop.
for offer in basket.offer_set.published().exclude(ticket_price__state=13):
_voucher_ids = list(offer.ticket_price.ticket_vouchers_multiple.all().values_list('id', flat=True))
if (offer.ticket_price.ticket_voucher and offer.ticket_price.ticket_voucher != ticket_price) or (_voucher_ids and ticket_price.id not in _voucher_ids):
....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment