summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-10 12:18:11 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-10 12:18:11 +0200
commit04bdc9d57ba7c2ece4c138c9dcb4072bb45a1608 (patch)
treece7a3393b28403e6f053704ac6f8f0b9da028d07 /ishtar_common/models.py
parent30d147bff5a2202f4d752c11596fd7f3f8939dd4 (diff)
downloadIshtar-04bdc9d57ba7c2ece4c138c9dcb4072bb45a1608.tar.bz2
Ishtar-04bdc9d57ba7c2ece4c138c9dcb4072bb45a1608.zip
Serialization - restore: manage history (or not)
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 8da6c9bba..afd9994ca 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -5721,7 +5721,7 @@ class ExportTask(models.Model):
class Meta:
verbose_name = _("Archive - Export")
- verbose_name_plural = _("Archive - Export")
+ verbose_name_plural = _("Archive - Exports")
ordering = ['creation_date']
def __str__(self):
@@ -5751,6 +5751,13 @@ class ImportTask(models.Model):
creation_date = models.DateTimeField(default=datetime.datetime.now)
launch_date = models.DateTimeField(null=True, blank=True)
finished_date = models.DateTimeField(null=True, blank=True)
+ import_user = models.ForeignKey(
+ User, related_name='+', on_delete=models.SET_NULL,
+ verbose_name=_("Import user"), blank=True, null=True,
+ help_text=_("If set the \"Import user\" will be the editor for last "
+ "version. If the field is left empty no history will be "
+ "recorded.")
+ )
state = models.CharField(_("State"), max_length=2, choices=EXPORT_STATE,
default='C')
delete_before = models.BooleanField(