diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-01-25 14:17:37 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-12 12:20:59 +0100 |
| commit | 6d2e5a20812bfa6c39d889f4481e68559122edc1 (patch) | |
| tree | fe72fceedca72c10321f6b42e4b3e95fe9d31a16 | |
| parent | 9c21514969df80c3b79c6627c2574e293e71e2d5 (diff) | |
| download | Ishtar-6d2e5a20812bfa6c39d889f4481e68559122edc1.tar.bz2 Ishtar-6d2e5a20812bfa6c39d889f4481e68559122edc1.zip | |
Fix history parameters
| -rw-r--r-- | ishtar_common/models_common.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index 0748a57cd..921b5d59b 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -1227,7 +1227,9 @@ class HistoricalRecords(BaseHistoricalRecords): def _get_history_m2m(self): q = model.objects.filter(pk=getattr(self, model._meta.pk.attname)) if q.count(): - return q.all()[0].history_m2m[attr] + item = q.all()[0] + if attr in item.history_m2m: + return item.history_m2m[attr] return _get_history_m2m def get_serialize_call(attr): |
