Fixes user permissions

Fix #2597
This commit is contained in:
Oskar Hahn 2016-11-08 23:13:15 +01:00
parent db38e5e075
commit a47e30c8f1

View File

@ -58,9 +58,10 @@ class UserAccessPermissions(BaseAccessPermissions):
fields = USERCANSEESERIALIZER_FIELDS fields = USERCANSEESERIALIZER_FIELDS
# Let only some fields pass this method. # Let only some fields pass this method.
data = {} data = {}
for key in full_data.keys(): for base_key in fields:
if key in fields: for key in (base_key, base_key + '_id'):
data[key] = full_data[key] if key in full_data.keys():
data[key] = full_data[key]
return data return data
def get_projector_data(self, full_data): def get_projector_data(self, full_data):