Commit a85e279e authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Merge branch 'master' of git.fsmpi.rwth-aachen.de:protokollsystem/proto3

parents c7097877 2ef6e50b
...@@ -226,14 +226,13 @@ class Protocol(DatabaseModel): ...@@ -226,14 +226,13 @@ class Protocol(DatabaseModel):
return "Protokoll:{}-{:%Y-%m-%d}".format(self.protocoltype.short_name, self.date) return "Protokoll:{}-{:%Y-%m-%d}".format(self.protocoltype.short_name, self.date)
def get_etherpad_link(self): def get_etherpad_link(self):
if self.pad_identifier is not None: if self.pad_identifier is None:
return self.pad_identifier identifier = self.get_identifier()
identifier = self.get_identifier() if self.protocoltype.non_reproducible_pad_links:
if self.protocoltype.non_reproducible_pad_links: identifier = "{}-{}".format(identifier, str(uuid4()))
identifier = "{}-{}".format(identifier, str(uuid4())) self.pad_identifier = identifier
self.pad_identifier = identifier db.session.commit()
db.session.commit() return get_etherpad_url(self.pad_identifier)
return get_etherpad_url(identifier)
def get_datetime(self): def get_datetime(self):
return datetime(self.date.year, self.date.month, self.date.day, self.protocoltype.usual_time.hour, self.protocoltype.usual_time.minute) return datetime(self.date.year, self.date.month, self.date.day, self.protocoltype.usual_time.hour, self.protocoltype.usual_time.minute)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment