summaryrefslogtreecommitdiff
path: root/archaeological_warehouse
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2014-05-12 21:21:04 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2014-05-12 21:23:12 +0200
commit18a6ad99164350af62d65efd6a1fd1aa4c419739 (patch)
treee69bfd5b3bc0843ec93223dc12d4a376d6b489c0 /archaeological_warehouse
parent6d05b2d357c15b9d291922ac67fecebe3208b55f (diff)
downloadIshtar-18a6ad99164350af62d65efd6a1fd1aa4c419739.tar.bz2
Ishtar-18a6ad99164350af62d65efd6a1fd1aa4c419739.zip
Person and organization deletion (refs #1675)
* add associated actions, wizards, forms * prevent deletion of associted items (operations, files, etc.) * give list of associated items before deletion and give access to these items
Diffstat (limited to 'archaeological_warehouse')
-rw-r--r--archaeological_warehouse/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py
index 1c8849f41..9f5558d78 100644
--- a/archaeological_warehouse/models.py
+++ b/archaeological_warehouse/models.py
@@ -35,7 +35,8 @@ class Warehouse(Address, OwnPerms):
name = models.CharField(_(u"Name"), max_length=40)
warehouse_type = models.ForeignKey(WarehouseType,
verbose_name=_(u"Warehouse type"))
- person_in_charge = models.ForeignKey(Person,
+ person_in_charge = models.ForeignKey(Person, on_delete=models.SET_NULL,
+ related_name='warehouse_in_charge',
verbose_name=_(u"Person in charge"), null=True, blank=True)
comment = models.TextField(_(u"Comment"), null=True, blank=True)