Add instance.id check to get_list() calls in backend editor
authorMagnus Hagander <magnus@hagander.net>
Sun, 12 May 2024 09:08:15 +0000 (11:08 +0200)
committerMagnus Hagander <magnus@hagander.net>
Sun, 12 May 2024 09:12:06 +0000 (11:12 +0200)
commitf2baae524bea9b4042bcfdfc7793bed9116632e7
tree8b75b75db483843d3b46628f56d38446998c9772
parent29b5b00d0eedd8a26ec60183abf9eb9c38cc6a61
Add instance.id check to get_list() calls in backend editor

Some get_list() implementations for backend editors did not properly
check that the instance they were passed actually existed, and could
crash if it didn't (most prominent example being the the
sessions<->slides link). Some of these are can't-happen (because the
object doesn't support adding new empty ones), but this commit adds a
guard to those as well just to be on the safe sid for future changes.
postgresqleu/confreg/backendforms.py
postgresqleu/confsponsor/backendforms.py
postgresqleu/elections/backendforms.py
postgresqleu/membership/backendforms.py