summaryrefslogtreecommitdiff
path: root/ishtar_common/models_common.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/models_common.py')
-rw-r--r--ishtar_common/models_common.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py
index 2074aa523..0345eada2 100644
--- a/ishtar_common/models_common.py
+++ b/ishtar_common/models_common.py
@@ -1080,6 +1080,8 @@ class Imported(models.Model):
imports = models.ManyToManyField(
Import, blank=True, related_name="imported_%(app_label)s_%(class)s"
)
+ timestamp_geo = models.IntegerField(_("Timestamp geo"), null=True, blank=True)
+ timestamp_label = models.IntegerField(_("Timestamp label"), null=True, blank=True)
class Meta:
abstract = True
@@ -3329,6 +3331,8 @@ class MainItem(ShortMenuItem, SerializeItem):
rel.update(need_update=True)
continue
for item in getattr(self, down_model).all():
+ if hasattr(self, "_timestamp"):
+ item._timestamp = self._timestamp
if hasattr(item, "cached_label_changed"):
item.cached_label_changed()
if hasattr(item, "main_geodata"):
@@ -3417,10 +3421,13 @@ class MainItem(ShortMenuItem, SerializeItem):
def regenerate_external_id(self):
if not hasattr(self, "external_id"):
return
+ try:
+ self.external_id = ""
+ self.auto_external_id = True
+ except AttributeError:
+ return
self.skip_history_when_saving = True
self._no_move = True
- self.external_id = ""
- self.auto_external_id = True
self.save()
def cached_label_changed(self):