diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2019-02-06 14:41:19 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2019-02-06 14:45:08 +0100 |
commit | f0a0a7918bb2030595b577c39c1852c29ea3f70e (patch) | |
tree | 873f1337aa01cfe97d6d5a0d8cb1ceb6c27408b6 /archaeological_operations/models.py | |
parent | 85f98bbe937c1a2a10436996faf84605a647c6e4 (diff) | |
download | Ishtar-f0a0a7918bb2030595b577c39c1852c29ea3f70e.tar.bz2 Ishtar-f0a0a7918bb2030595b577c39c1852c29ea3f70e.zip |
Main image: fix bad "on_delete" behaviour
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index e711def95..162692e20 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -266,6 +266,7 @@ class ArchaeologicalSite(BaseHistorizedItem, OwnPerms, ValueGetter, blank=True) main_image = models.ForeignKey( Document, related_name='main_image_sites', + on_delete=models.SET_NULL, verbose_name=_(u"Main image"), blank=True, null=True) cached_label = models.TextField(_(u"Cached name"), null=True, blank=True, db_index=True) @@ -853,6 +854,7 @@ class Operation(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, blank=True) main_image = models.ForeignKey( Document, related_name='main_image_operations', + on_delete=models.SET_NULL, verbose_name=_(u"Main image"), blank=True, null=True) cached_label = models.CharField(_(u"Cached name"), max_length=500, null=True, blank=True, db_index=True) |