Ejemplo n.º 1
0
 def add_note(self, text: str) -> Note:
     note = Note.from_alert(self, text)
     history = History(id=note.id,
                       event=self.event,
                       severity=self.severity,
                       status=self.status,
                       value=self.value,
                       text=text,
                       change_type=ChangeType.note,
                       update_time=datetime.utcnow(),
                       user=g.login)
     db.add_history(self.id, history)
     return note
Ejemplo n.º 2
0
 def add_note(self, text: str) -> Note:
     return Note.from_alert(self, text)