diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-09-14 20:13:24 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-09-14 20:13:24 +0200 |
commit | af5ff7546e622378867badccb9500764e089b01b (patch) | |
tree | f719190a8521bc349dbb22dd4f436f5c345ac507 /archaeological_finds/models_finds.py | |
parent | 32bfebd0f8ef2dc80398bc5fe9dc5a9f793f34e7 (diff) | |
download | Ishtar-af5ff7546e622378867badccb9500764e089b01b.tar.bz2 Ishtar-af5ff7546e622378867badccb9500764e089b01b.zip |
Duplicate action : deassociate documents
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r-- | archaeological_finds/models_finds.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 8d4c65f1a..157841ab7 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -1999,6 +1999,8 @@ class Find(BulkUpdatedItem, ValueGetter, DocumentItem, BaseHistorizedItem, if bf: new.base_finds.add(bf.duplicate( user=user, data={"label": new.label, "external_id": None})) + # remove documents for this kind of duplicate (data entry) + new.documents.clear() return new @classmethod |