Fix for setting is_private on new permission-less projects

This commit is contained in:
Sybren A. Stüvel 2016-05-06 19:11:58 +02:00
parent 879a18ee68
commit 666a5842a5

View File

@ -40,6 +40,10 @@ def override_is_private_field(project, original):
:param project: the project, which will be updated :param project: the project, which will be updated
""" """
if 'permissions' not in project:
project['is_private'] = False
return
world_perms = project['permissions'].get('world', []) world_perms = project['permissions'].get('world', [])
project['is_private'] = 'GET' not in world_perms project['is_private'] = 'GET' not in world_perms