From b7de395c03e3aa4ac7cf29568cc00951faaa2a49 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 28 May 2018 11:23:51 +0200 Subject: Warehouse: fix related name in a query --- archaeological_warehouse/forms.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'archaeological_warehouse/forms.py') diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py index 15cfead74..e13255efc 100644 --- a/archaeological_warehouse/forms.py +++ b/archaeological_warehouse/forms.py @@ -306,8 +306,7 @@ class LocalisationForm(CustomForm, forms.Form): super(LocalisationForm, self).__init__(*args, **kwargs) if not self.warehouse: return - for divlink in self.warehouse.warehousedivisionlink_set.order_by( - 'order').all(): + for divlink in self.warehouse.divisions.order_by('order').all(): initial = u"-" if self.container: q = models.ContainerLocalisation.objects.filter( -- cgit v1.2.3