summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_treatments.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-11-30 18:47:14 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-11-30 18:48:21 +0100
commiteddd946150bcd9d4ddb05000806cc2cdfb9af60d (patch)
treee091e17882ca67be8e6040e938439fa5a5e6bc5a /archaeological_finds/models_treatments.py
parentafd7fb9c2be01a44a45f582eebdf02632a10be99 (diff)
downloadIshtar-eddd946150bcd9d4ddb05000806cc2cdfb9af60d.tar.bz2
Ishtar-eddd946150bcd9d4ddb05000806cc2cdfb9af60d.zip
Manage basket to treatment file association
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r--archaeological_finds/models_treatments.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py
index 29afc94e3..cc0d17dd0 100644
--- a/archaeological_finds/models_treatments.py
+++ b/archaeological_finds/models_treatments.py
@@ -162,8 +162,6 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem,
blank=True, null=True)
insurance_cost = models.FloatField(_(u"Insurance cost"),
blank=True, null=True)
- target_is_basket = models.BooleanField(_(u"Target a basket"),
- default=False)
documents = models.ManyToManyField(
Document, related_name='treatments', verbose_name=_(u"Documents"),
blank=True)
@@ -766,6 +764,10 @@ class TreatmentFile(DashboardFormItem, ClosedItem, BaseHistorizedItem,
documents = models.ManyToManyField(
Document, related_name='treatment_files', verbose_name=_(u"Documents"),
blank=True)
+ associated_basket = models.ForeignKey(
+ FindBasket, null=True, blank=True, on_delete=models.SET_NULL,
+ related_name='treatment_files'
+ )
cached_label = models.TextField(_(u"Cached name"), null=True, blank=True,
db_index=True)
history = HistoricalRecords()