CSV export and list view used to very different mechanisms to get the list of devices. The strange thing about DeviceList is that in some cases, it actually got a list of lendings, not devices.
I changed the code so that both views use the same function that always returns a query set on the Device model. I hope that I managed to merge the relevant condition from both views.
fixes #327.
CSV export and list view used to very different mechanisms to get the list of devices. The strange thing about
DeviceList
is that in some cases, it actually got a list of lendings, not devices.I changed the code so that both views use the same function that always returns a query set on the Device model. I hope that I managed to merge the relevant condition from both views.