def _set_base_permissions(self, obj): update_permissions = False if not obj.id: if not obj.is_private: # Creating a public project update_permissions = True else: if self.get_object().is_private != obj.is_private: # Changing project public state update_permissions = True if update_permissions: permissions_service.set_base_permissions_for_project(obj)
def _set_base_permissions(self, obj): update_permissions = False if not obj.id: if not obj.is_private: # Creating a public project update_permissions = True else: if self.get_object().is_private != obj.is_private: # Changing project public state update_permissions = True if update_permissions: permissions_service.set_base_permissions_for_project(obj)