def addJournalEntry(incident, entry_line): hi = HistoryItem() hi.journal_entry = entry_line try: incident.history.append(hi) except AttributeError: incident.history = History(hi)
def addJournalEntry(incident, entry_line): hi = HistoryItem() hi.journal_entry = entry_line incident.history.append(hi)