diff options
| -rw-r--r-- | changelog/en/changelog_2022-06-15.md | 8 | ||||
| -rw-r--r-- | changelog/fr/changelog_2023-01-25.md | 8 | ||||
| -rw-r--r-- | ishtar_common/data_importer.py | 29 | ||||
| -rw-r--r-- | ishtar_common/version.py | 4 |
4 files changed, 43 insertions, 6 deletions
diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md index 3ff232ed5..7b529d036 100644 --- a/changelog/en/changelog_2022-06-15.md +++ b/changelog/en/changelog_2022-06-15.md @@ -1,3 +1,11 @@ +v4.2.19 - 2026-05-22 +-------------------- + +### Bug fixes ### +- imports: fix update +- map: fix bad display of OpenStreetMap tiles (force referrerPolicy) + + v4.2.18 - 2026-04-14 -------------------- diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md index 012103ae9..4d55b86ca 100644 --- a/changelog/fr/changelog_2023-01-25.md +++ b/changelog/fr/changelog_2023-01-25.md @@ -1,3 +1,11 @@ +v4.2.19 - 2026-05-22 +-------------------- + +### Correction de dysfonctionnements ### +- imports : corrections sur les mises à jour +- carte : correction de l'affichage de certains tuiles OpenStreetMap (utilisation de la referrerPolicy) + + v4.2.18 - 2026-04-14 -------------------- diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py index 584917c8e..b06bef0a2 100644 --- a/ishtar_common/data_importer.py +++ b/ishtar_common/data_importer.py @@ -2068,19 +2068,21 @@ class Importer(object): else: self.new_objects.append((path, cls, new_dct)) else: - # manage UNICITY_KEYS - only level 1 + new_values = {} + # manage UNICITY_KEYS - only level 1 -> no path if not path and self.UNICITY_KEYS: get_by_unicity_key = True for k in list(dct.keys()): if k not in self.UNICITY_KEYS and k != "defaults": if dct[k]: - defaults[k] = dct.pop(k) + new_values[k] = dct.pop(k) else: dct.pop(k) if "get_default" in dct and dct["get_default"]: dct.pop("get_default") new_dct = defaults.copy() new_dct.update(dct) + new_dct.update(new_values) dct = new_dct if self.simulate: @@ -2113,7 +2115,7 @@ class Importer(object): self.updated_objects.append([path, q.all()[0], dct, {}]) dct["defaults"] = defaults.copy() else: - if not dct and not defaults: + if not dct and not defaults and not new_values: obj = None else: if ( @@ -2126,6 +2128,7 @@ class Importer(object): else: created = True new_dct = dct.copy() + new_dct.update(new_values) for k in defaults: if k not in dct: new_dct[k] = defaults[k] @@ -2141,7 +2144,7 @@ class Importer(object): raise self._get_does_not_exist_in_db_error(cls, dct) dct["defaults"] = defaults.copy() - # manage default values and concatenation + # manage default, updated values and concatenation if not created and not path and self.UNICITY_KEYS and obj is not None: updated_dct = {} for k in dct["defaults"]: @@ -2162,6 +2165,24 @@ class Importer(object): if k in self.concat_str: sep = self.concat_str[k] updated_dct[k] = val + sep + new_val + for k in new_values: + new_val = new_values[k] + if new_val is None or new_val == "": + continue + val = getattr(obj, k) + if obj and k == "data": + updated_dct[k] = update_data(obj.data, new_val) + elif ( + k in self.concats + and type(val) == str + and type(new_val) == str + ): + sep = "" + if k in self.concat_str: + sep = self.concat_str[k] + updated_dct[k] = val + sep + new_val + else: + updated_dct[k] = new_val if updated_dct: if self.simulate: self.updated_objects[-1][-1] = updated_dct diff --git a/ishtar_common/version.py b/ishtar_common/version.py index 1204a0730..7adf9e21f 100644 --- a/ishtar_common/version.py +++ b/ishtar_common/version.py @@ -1,5 +1,5 @@ -# 4.2.18 -VERSION = (4, 2, 18) +# 4.2.19 +VERSION = (4, 2, 19) def get_version(): |
