Merge pull request #3421 from FinnStutzenstein/MotionCommentsFix3
Fixing motion comments
This commit is contained in:
commit
456d1ff763
@ -65,7 +65,7 @@ class MotionAccessPermissions(BaseAccessPermissions):
|
|||||||
# Set private comment fields to None.
|
# Set private comment fields to None.
|
||||||
full_copy = deepcopy(full)
|
full_copy = deepcopy(full)
|
||||||
for i, field in config['motions_comments'].items():
|
for i, field in config['motions_comments'].items():
|
||||||
if not field.get('public'):
|
if field is None or not field.get('public'):
|
||||||
try:
|
try:
|
||||||
full_copy['comments'][i] = None
|
full_copy['comments'][i] = None
|
||||||
except IndexError:
|
except IndexError:
|
||||||
@ -90,7 +90,7 @@ class MotionAccessPermissions(BaseAccessPermissions):
|
|||||||
if full.get('comments') is not None:
|
if full.get('comments') is not None:
|
||||||
full_copy = deepcopy(full)
|
full_copy = deepcopy(full)
|
||||||
for i, field in config['motions_comments'].items():
|
for i, field in config['motions_comments'].items():
|
||||||
if not field.get('public'):
|
if field is None or not field.get('public'):
|
||||||
try:
|
try:
|
||||||
full_copy['comments'][i] = None
|
full_copy['comments'][i] = None
|
||||||
except IndexError:
|
except IndexError:
|
||||||
|
Loading…
Reference in New Issue
Block a user