about summary refs log tree commit diff
path: root/gn3/db/case_attributes.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/db/case_attributes.py')
-rw-r--r--gn3/db/case_attributes.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/gn3/db/case_attributes.py b/gn3/db/case_attributes.py
index 7076ec8..356b745 100644
--- a/gn3/db/case_attributes.py
+++ b/gn3/db/case_attributes.py
@@ -39,7 +39,7 @@ class EditStatus(Enum):
         return self.name
 
 
-def queue_edit(cursor, directory: Path, edit: CaseAttributeEdit) -> int:
+def queue_edit(cursor, directory: Path, edit: CaseAttributeEdit) -> Optional[int]:
     """Queues a case attribute edit for review by inserting it into
     the audit table and storing its review ID in an LMDB database.
 
@@ -74,6 +74,7 @@ def queue_edit(cursor, directory: Path, edit: CaseAttributeEdit) -> int:
         review_ids = set()
         if reviews := txn.get(b"review"):
             review_ids = pickle.loads(reviews)
-        review_ids.add(cursor.lastrowid)
+        _id = cursor.lastrowid
+        review_ids.add(_id)
         txn.put(b"review", pickle.dumps(review_ids))
-        return review_ids
+        return _id