Mercurial > p > roundup > code
diff roundup/backends/back_anydbm.py @ 6179:a701c9c81597
Fix rev_multilink properties search/retrieval
The code now only returns live (non-retired) items. Since for reverse
multilinks the Link/Multilink property in the retired item cannot be
changed, we now only return non-retired items in search (filter) and
retrieve (get).
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Tue, 19 May 2020 09:25:48 +0200 |
| parents | ff059afae50a |
| children | e9d12d516517 |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Tue May 19 01:14:48 2020 -0400 +++ b/roundup/backends/back_anydbm.py Tue May 19 09:25:48 2020 +0200 @@ -1138,6 +1138,11 @@ # get the property (raises KeyErorr if invalid) prop = self.properties[propname] + if isinstance(prop, hyperdb.Multilink) and prop.computed: + cls = self.db.getclass(prop.rev_classname) + ids = cls.find(**{prop.rev_propname: nodeid}) + return ids + if propname not in d: if default is _marker: if isinstance(prop, hyperdb.Multilink):
