[rentals] Fix form field ids in lockerIndex view

This commit is contained in:
Adam Goldsmith 2022-02-17 00:06:59 -05:00
parent 0427c3f565
commit 3b8d97573f

View File

@ -11,7 +11,10 @@ from .forms import LockerInfoForm
def lockerIndex(request):
locker_banks = {
bank: {
unit: [LockerInfoForm(instance=locker) for locker in unit.lockers.all()]
unit: [
LockerInfoForm(instance=locker, auto_id=locker.address + "_%s")
for locker in unit.lockers.all()
]
for unit in bank.units.all()
}
for bank in LockerBank.objects.all()