create a protocol

This commit is contained in:
2020-09-08 05:20:54 +00:00
parent dae31408d5
commit a00c24ff36

View File

@@ -150,11 +150,11 @@ class Post(models.Model):
self.slug = slugify(self.public_date.date()) + "-" + slugify(self.title) self.slug = slugify(self.public_date.date()) + "-" + slugify(self.title)
if self.has_agenda:# and (self.agenda_key == "" or self.agenda_key is None): if self.has_agenda:# and (self.agenda_key == "" or self.agenda_key is None):
self.agenda_key= ep.createPadifNotExists(self.slug+"agenda") self.agenda_key= ep.createPadifNotExists(self.slug+"-agenda")
print("AgendaKey: %s" %self.agenda_key)
print("should create an agenda document")
if self.has_protocol and (self.agenda_key == "" or self.agenda_key is None): 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") print("should initialize protocol document")
super().save(*args, **kwargs) super().save(*args, **kwargs)