diff --git a/server/model/schema.py b/server/model/schema.py index cccf26f2..70ec87b1 100644 --- a/server/model/schema.py +++ b/server/model/schema.py @@ -22,7 +22,7 @@ def processor(value): def result_processor(self, dialect, coltype): def processor(value): - if not isinstance(value, bytes): + if value and not isinstance(value, bytes): value = bytes(value) return str(bson.ObjectId(value)) if bson.ObjectId.is_valid(value) else value