Merge pull request #2570 from emanuelschuetze/fix-inmemory-cache

Fix updating of motion comments for inmemory cache.
This commit is contained in:
Norman Jäckel 2016-11-02 14:24:30 +01:00 committed by GitHub
commit 8c4a69dfb2

View File

@ -1,3 +1,5 @@
from copy import deepcopy
from ..core.config import config from ..core.config import config
from ..utils.access_permissions import BaseAccessPermissions from ..utils.access_permissions import BaseAccessPermissions
@ -29,7 +31,7 @@ class MotionAccessPermissions(BaseAccessPermissions):
if user.has_perm('motions.can_see_and_manage_comments') or not full_data.get('comments'): if user.has_perm('motions.can_see_and_manage_comments') or not full_data.get('comments'):
data = full_data data = full_data
else: else:
data = full_data.copy() data = deepcopy(full_data)
for i, field in enumerate(config['motions_comments']): for i, field in enumerate(config['motions_comments']):
if not field.get('public'): if not field.get('public'):
try: try: