Skip to content

Commit

Permalink
Remove OFFSET from queries
Browse files Browse the repository at this point in the history
This must be an old copy/paste, because we want to list all regclasses
not just the cases where there's more than one.
  • Loading branch information
mhagander committed Nov 19, 2024
1 parent 3b5593f commit 2958a2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postgresqleu/confreg/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4374,8 +4374,8 @@ def admin_attendeemail(request, urlname):
mails = AttendeeMail.objects.prefetch_related('regclasses', 'registrations', 'pending_regs', 'addopts').filter(conference=conference).extra(where=[
"""tovolunteers OR tocheckin
OR EXISTS (SELECT 1 FROM confreg_attendeemail_addopts WHERE attendeemail_id=confreg_attendeemail.id)
OR EXISTS (SELECT 1 FROM confreg_attendeemail_regclasses WHERE attendeemail_id=confreg_attendeemail.id OFFSET 1)
OR EXISTS (SELECT 1 FROM confreg_attendeemail_pending_regs WHERE attendeemail_id=confreg_attendeemail.id OFFSET 1)""",
OR EXISTS (SELECT 1 FROM confreg_attendeemail_regclasses WHERE attendeemail_id=confreg_attendeemail.id)
OR EXISTS (SELECT 1 FROM confreg_attendeemail_pending_regs WHERE attendeemail_id=confreg_attendeemail.id)""",
])

if request.method == 'POST':
Expand Down

0 comments on commit 2958a2b

Please sign in to comment.