Resolve "Fix participants count" #232

Merged
magicfelix merged 1 commit from 99-fix-participants-count into master 2026-01-12 15:29:23 +01:00
magicfelix commented 2026-01-12 13:38:51 +01:00 (Migrated from edugit.org)

Closes #99

Closes #99
magicfelix commented 2026-01-12 13:38:51 +01:00 (Migrated from edugit.org)

assigned to @nik

assigned to @nik
magicfelix commented 2026-01-12 13:43:48 +01:00 (Migrated from edugit.org)

added 1 commit

  • d475a189 - Fix participants count

Compare with previous version

added 1 commit <ul><li>d475a189 - Fix participants count</li></ul> [Compare with previous version](/Teckids/hacknfun/AlekSIS-App-Paweljong/-/merge_requests/111/diffs?diff_id=81248&start_sha=5ad02401aebaefa14723b51b282c5bed6467ec69)
nik commented 2026-01-12 14:18:37 +01:00 (Migrated from edugit.org)

This is inefficient because it makes another database query when evaluating the template. The participants_persons field should be added as an annotation in the original object passed to the template.

This is inefficient because it makes another database query when evaluating the template. The `participants_persons` field should be added as an annotation in the original object passed to the template.
nik commented 2026-01-12 14:18:55 +01:00 (Migrated from edugit.org)

Doesn't this change also require changes to the registration process?

Doesn't this change also require changes to the registration process?
hansegucker commented 2026-01-12 14:21:25 +01:00 (Migrated from edugit.org)

(can be done with PrefetchRelated with a query or a filtered relation, I think)

(can be done with PrefetchRelated with a query or a filtered relation, I think)
nik commented 2026-01-12 14:22:41 +01:00 (Migrated from edugit.org)

Oh, several additional queries, actually.

Oh, *several* additional queries, actually.
magicfelix commented 2026-01-12 14:28:42 +01:00 (Migrated from edugit.org)

Why? I tested registration to an event with max_participants = 7 and a linked group that had 7 members, of which 6 had the participant role and one had another role. Registration was successful. And after this registration, the event was displayed as not available, because then it had 7/7 participants.

Why? I tested registration to an event with `max_participants` = 7 and a linked group that had 7 members, of which 6 had the participant role and one had another role. Registration was successful. And after this registration, the event was displayed as not available, because then it had 7/7 participants.
magicfelix commented 2026-01-12 15:16:02 +01:00 (Migrated from edugit.org)

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/Teckids/hacknfun/AlekSIS-App-Paweljong/-/merge_requests/111/diffs?diff_id=81260&start_sha=d475a189108305eea547eea440ca51f19a8f3b64#19199035a89f0489f03754f25d2cec7ef0d0ae92_374_371)
magicfelix commented 2026-01-12 15:16:05 +01:00 (Migrated from edugit.org)

added 1 commit

Compare with previous version

added 1 commit <ul><li>9f302f10 - Fix participants count</li></ul> [Compare with previous version](/Teckids/hacknfun/AlekSIS-App-Paweljong/-/merge_requests/111/diffs?diff_id=81260&start_sha=d475a189108305eea547eea440ca51f19a8f3b64)
magicfelix commented 2026-01-12 15:16:38 +01:00 (Migrated from edugit.org)

resolved all threads

resolved all threads
nik commented 2026-01-12 15:29:23 +01:00 (Migrated from edugit.org)

mentioned in commit 870015c159

mentioned in commit 870015c159bee50c3aec48896235b87081222e84
nik (Migrated from edugit.org) merged commit 870015c159 into master 2026-01-12 15:29:24 +01:00
Sign in to join this conversation.
No reviewers
No labels
Doing
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
teckids/AlekSIS-App-Paweljong!232
No description provided.