Skip to content
Snippets Groups Projects
Commit a688bcdb authored by Raphael Collet's avatar Raphael Collet
Browse files

[FIX] fields: make `copy_cache` not invalidate the cache!

parent 08b28611
No related branches found
No related tags found
No related merge requests found
......@@ -64,9 +64,11 @@ def copy_cache(records, env):
for record, target in zip(records, records.with_env(env)):
if not target._cache:
for name, value in record._cache.iteritems():
target[name] = value
if isinstance(value, BaseModel):
target._cache[name] = value.with_env(env)
copy_cache(value, env)
else:
target._cache[name] = value
def resolve_all_mro(cls, name, reverse=False):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment