diff --git a/src/grung/db.py b/src/grung/db.py index 00c7629..ddce634 100644 --- a/src/grung/db.py +++ b/src/grung/db.py @@ -52,8 +52,8 @@ class RecordTable(table.Table): def _check_unique(self, document) -> bool: matches = [ - match - for match in self.search( + dict(match) + for match in super().search( reduce( ior, [ diff --git a/src/grung/types.py b/src/grung/types.py index cda5f6b..48a5004 100644 --- a/src/grung/types.py +++ b/src/grung/types.py @@ -140,7 +140,7 @@ class Pointer(Field): def reference(cls, value: Record | str): # XXX This could be smarter if isinstance(value, str): - if '::' not in value: + if "::" not in value: raise PointerReferenceError("Value {value} does not look like a reference!") return value if value: @@ -203,5 +203,3 @@ class Collection(Field): for backref in target._metadata.backrefs(type(record)): target[backref.name] = record db.save(target) - -