On publie un événement récemment importé si on édite une nouvelle version
This commit is contained in:
parent
35832485e3
commit
e42ac94318
@ -903,6 +903,13 @@ class Event(models.Model):
|
|||||||
if clone:
|
if clone:
|
||||||
self.other_versions.representative = self
|
self.other_versions.representative = self
|
||||||
self.other_versions.save()
|
self.other_versions.save()
|
||||||
|
# if we just clone a single event, its status is
|
||||||
|
# the same as the status of the current object
|
||||||
|
if self.other_versions.get_duplicated().count() == 2:
|
||||||
|
for e in self.other_versions.get_duplicated():
|
||||||
|
if e != self:
|
||||||
|
e.status = self.status
|
||||||
|
e.save()
|
||||||
|
|
||||||
def from_structure(event_structure, import_source=None):
|
def from_structure(event_structure, import_source=None):
|
||||||
if "category" in event_structure and event_structure["category"] is not None:
|
if "category" in event_structure and event_structure["category"] is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user