Properties can be None somehow
@@ -1224,6 +1224,7 @@ class SQLAlchemySocket:
doc = ResultORM(**result.dict(exclude={"id", "properties"}))
# Keep properties as JSON (PR #694)
+ if result.properties is not None:
doc.properties = result.properties.dict(encoding="json")
# Store in existing_results in case later records are duplicates
@@ -1318,6 +1319,8 @@ class SQLAlchemySocket:
# must use json encoding to remove numpy arrays of properties
data = result.dict(exclude={"id", "properties"})
+
+ if result.properties is not None:
data["properties"] = result.properties.dict(encoding="json")
# retrieve the found item
