diff --git a/fet2020/posts/models.py b/fet2020/posts/models.py index b7897442..528f6fb2 100644 --- a/fet2020/posts/models.py +++ b/fet2020/posts/models.py @@ -150,11 +150,11 @@ class Post(models.Model): self.slug = slugify(self.public_date.date()) + "-" + slugify(self.title) if self.has_agenda:# and (self.agenda_key == "" or self.agenda_key is None): - self.agenda_key= ep.createPadifNotExists(self.slug+"agenda") - print("AgendaKey: %s" %self.agenda_key) - print("should create an agenda document") + self.agenda_key= ep.createPadifNotExists(self.slug+"-agenda") + if self.has_protocol and (self.agenda_key == "" or self.agenda_key is None): + self.protocol_key = ep.createPadifNotExists(self.slug+"-protocol") print("should initialize protocol document") super().save(*args, **kwargs)