summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_warehouse/forms.py')
-rw-r--r--archaeological_warehouse/forms.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py
index 83f045349..68adc66c1 100644
--- a/archaeological_warehouse/forms.py
+++ b/archaeological_warehouse/forms.py
@@ -353,6 +353,9 @@ class ContainerForm(CustomForm, ManageOldType, forms.Form):
dct['location'] = models.Warehouse.objects.get(pk=dct['location'])
if dct.get("parent", None):
dct['parent'] = models.Container.objects.get(pk=dct['parent'])
+ if dct.get("responsibility", None):
+ dct['responsibility'] = models.Warehouse.objects.get(
+ pk=dct['responsibility'])
new_item = models.Container(**dct)
new_item.save()
return new_item
@@ -589,11 +592,13 @@ class QAContainerFormMulti(QAForm):
PREFIX = "qa"
form_admin_name = _("Container - Quick action - Modify")
form_slug = "container-quickaction-modify"
- base_models = ['qaparent', 'qacontainer_type', 'qalocation']
+ base_models = ['qaparent', 'qacontainer_type',
+ 'qalocation', 'qaresponsibility']
associated_models = {
'qaparent': models.Container,
'qacontainer_type': models.ContainerType,
'qalocation': models.Warehouse,
+ 'qaresponsibility': models.Warehouse,
}
MULTI = True