Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/escalation_running_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import markdown
import yaml
from genologics_sql.utils import get_session
from ibm_cloud_sdk_core.api_exception import ApiException
from sqlalchemy import text
from sqlalchemy.orm import aliased

Expand Down Expand Up @@ -74,7 +75,10 @@ def make_esc_running_note(

def update_note_db(note):
updated = False
note_existing = couch.get_document(db=db, doc_id=note["_id"]).get_result()
try:
note_existing = couch.get_document(db=db, doc_id=note["_id"]).get_result()
except ApiException:
note_existing = None
if "_rev" in note.keys():
del note["_rev"]

Expand Down