Skip to content
Snippets Groups Projects
Commit a25ef87c authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

FIX: if multiple updates for one entity exist, the retrieve would result in an...

FIX: if multiple updates for one entity exist, the retrieve would result in an slim <Entity id='255'/> object
parent 11574f7e
No related branches found
No related tags found
2 merge requests!59FIX: if multiple updates for one entity exist, the retrieve would result in an...,!46F cache version
...@@ -300,8 +300,10 @@ class Cache(AbstractCache): ...@@ -300,8 +300,10 @@ class Cache(AbstractCache):
if entities is None: if entities is None:
# TODO this might become a problem. If many entities are cached, # TODO this might become a problem. If many entities are cached,
# then all of them are retrieved here... # then all of them are retrieved here...
ids = [c_id for c_id, _ in res]
ids = set(ids)
entities = db.Container() entities = db.Container()
entities.extend([db.Entity(id=c_id) for c_id, _ in res]) entities.extend([db.Entity(id=c_id) for c_id in ids])
entities.retrieve() entities.retrieve()
v = {c_id: c_version for c_id, c_version in res} v = {c_id: c_version for c_id, c_version in res}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment