|
121 | 121 | Languages, |
122 | 122 | Network_Locations, |
123 | 123 | Note_Type, |
| 124 | + NoteHistory, |
124 | 125 | Notes, |
125 | 126 | Notification_Webhooks, |
126 | 127 | Notifications, |
@@ -532,6 +533,10 @@ def notes(self, request, pk=None): |
532 | 533 | note_type=note_type, |
533 | 534 | ) |
534 | 535 | note.save() |
| 536 | + # Add an entry to the note history |
| 537 | + history = NoteHistory.objects.create(data=note.entry, time=note.date, current_editor=note.author) |
| 538 | + note.history.add(history) |
| 539 | + # Now add the note to the object |
535 | 540 | engagement.notes.add(note) |
536 | 541 | # Determine if we need to send any notifications for user mentioned |
537 | 542 | process_tag_notifications( |
@@ -1125,6 +1130,10 @@ def notes(self, request, pk=None): |
1125 | 1130 | note_type=note_type, |
1126 | 1131 | ) |
1127 | 1132 | note.save() |
| 1133 | + # Add an entry to the note history |
| 1134 | + history = NoteHistory.objects.create(data=note.entry, time=note.date, current_editor=note.author) |
| 1135 | + note.history.add(history) |
| 1136 | + # Now add the note to the object |
1128 | 1137 | finding.last_reviewed = note.date |
1129 | 1138 | finding.last_reviewed_by = author |
1130 | 1139 | finding.save(update_fields=["last_reviewed", "last_reviewed_by", "updated"]) |
@@ -2188,6 +2197,10 @@ def notes(self, request, pk=None): |
2188 | 2197 | note_type=note_type, |
2189 | 2198 | ) |
2190 | 2199 | note.save() |
| 2200 | + # Add an entry to the note history |
| 2201 | + history = NoteHistory.objects.create(data=note.entry, time=note.date, current_editor=note.author) |
| 2202 | + note.history.add(history) |
| 2203 | + # Now add the note to the object |
2191 | 2204 | test.notes.add(note) |
2192 | 2205 | # Determine if we need to send any notifications for user mentioned |
2193 | 2206 | process_tag_notifications( |
|
0 commit comments