From afced90f19200d6cee871a18baf02e1cbff35e5f Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 20 Feb 2025 18:10:37 +0100 Subject: [PATCH] fix edit lot --- lot/views.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lot/views.py b/lot/views.py index a64405f..341f15b 100644 --- a/lot/views.py +++ b/lot/views.py @@ -87,6 +87,14 @@ class EditLotView(DashboardView, UpdateView): kwargs = super().get_form_kwargs() return kwargs + def get_form(self): + form = super().get_form() + form.fields["type"].queryset = LotTag.objects.filter( + owner=self.request.user.institution, + inbox=False + ) + return form + class AddToLotView(DashboardView, FormView): template_name = "list_lots.html"