diff --git a/seamm_dashboard/routes/projects/views.py b/seamm_dashboard/routes/projects/views.py index 96780bc0..a87ba505 100644 --- a/seamm_dashboard/routes/projects/views.py +++ b/seamm_dashboard/routes/projects/views.py @@ -188,11 +188,16 @@ def manage_project(project_id): if request.method == "POST": if form.validate_on_submit(): - if form.allow_public: + if form.allow_public.data: permissions = deepcopy(project.permissions) permissions["other"] = ["read"] project.permissions = permissions db.session.commit() + else: + permissions = deepcopy(project.permissions) + permissions["other"] = [] + project.permissions = permissions + db.session.commit() user_keys = [ x for x in form.data.keys() if "user" in x if form.data[x] is True