Set temp. current attributes to assets pool to prevent lookup loops.

This commit is contained in:
Martin Edenhofer 2015-07-05 10:08:03 +02:00
parent 73fe87b622
commit 2a101fc9de
2 changed files with 8 additions and 0 deletions

View file

@ -32,6 +32,10 @@ returns
if !data[ Organization.to_app_model ][ id ]
local_attributes = attributes
# set temp. current attributes to assets pool to prevent
# loops, will be updated with lookup attributes later
data[ Organization.to_app_model ][ id ] = local_attributes
# get organizations
key = "Organization::member_ids::#{id}"
local_member_ids = Cache.get(key)

View file

@ -32,6 +32,10 @@ returns
# do not transfer crypted pw
local_attributes['password'] = ''
# set temp. current attributes to assets pool to prevent
# loops, will be updated with lookup attributes later
data[ User.to_app_model ][ id ] = local_attributes
# get linked accounts
local_attributes['accounts'] = {}
key = "User::authorizations::#{id}"