diff options
author | Étienne Loks <etienne@peacefrogs.net> | 2019-02-06 15:31:06 +0100 |
---|---|---|
committer | Étienne Loks <etienne@peacefrogs.net> | 2019-02-06 15:31:06 +0100 |
commit | 4dc674ea9fa7516878a7b128da10ca9f09a6a1c7 (patch) | |
tree | 996f49e49c31c5c6644905ee3d9a3bf30da3bd1f /archaeological_finds/models_treatments.py | |
parent | 4cbb3429c3243e93597c2d2fbc668b444499c728 (diff) | |
download | Ishtar-4dc674ea9fa7516878a7b128da10ca9f09a6a1c7.tar.bz2 Ishtar-4dc674ea9fa7516878a7b128da10ca9f09a6a1c7.zip |
ForeignKey: SET_NULL fix
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r-- | archaeological_finds/models_treatments.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index a1e0a0437..041721d68 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -138,6 +138,7 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, index = models.IntegerField(_(u"Index"), default=1) file = models.ForeignKey( 'TreatmentFile', related_name='treatments', blank=True, null=True, + on_delete=models.SET_NULL, verbose_name=_(u"Associated request")) treatment_types = models.ManyToManyField( TreatmentType, verbose_name=_(u"Treatment type")) @@ -149,6 +150,7 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, _(u"Treatment have been executed"), default=False) location = models.ForeignKey( Warehouse, verbose_name=_(u"Location"), blank=True, null=True, + on_delete=models.SET_NULL, help_text=_( u"Location where the treatment is done. Target warehouse for " u"a move.")) @@ -167,6 +169,7 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, end_date = models.DateField(_(u"Closing date"), blank=True, null=True) creation_date = models.DateTimeField(default=datetime.datetime.now) container = models.ForeignKey(Container, verbose_name=_(u"Container"), + on_delete=models.SET_NULL, blank=True, null=True) estimated_cost = models.FloatField(_(u"Estimated cost"), blank=True, null=True) |