diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-24 19:34:27 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-24 19:37:02 +0200 |
| commit | 73eedc117776ad42e2241232ad1dcc547cb967b2 (patch) | |
| tree | fb1c2133c08e1bdc3d1a087618c59776546ee266 /archaeological_finds/models_finds.py | |
| parent | 8fa0f928e68e10d4ef055bf9afd47e0e91ce7b55 (diff) | |
| download | Ishtar-73eedc117776ad42e2241232ad1dcc547cb967b2.tar.bz2 Ishtar-73eedc117776ad42e2241232ad1dcc547cb967b2.zip | |
Datings: post-fix of duplicates associated to the same object (usually on imports)
Diffstat (limited to 'archaeological_finds/models_finds.py')
| -rw-r--r-- | archaeological_finds/models_finds.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 4fea6edd3..78280bede 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -1095,6 +1095,12 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, # base_find.material_index = \ # idx and idx['material_index__max'] + 1 or 1 + def fix(self): + """ + Fix redundant m2m dating association (usually after imports) + """ + Dating.fix_dating_association(self) + post_save.connect(cached_label_changed, sender=Find) |
