diff --git a/onadata/libs/utils/project_utils.py b/onadata/libs/utils/project_utils.py index 6323f6cd8e..1982b9b159 100644 --- a/onadata/libs/utils/project_utils.py +++ b/onadata/libs/utils/project_utils.py @@ -21,9 +21,13 @@ from onadata.apps.logger.models.project import Project from onadata.apps.logger.models.xform import XForm from onadata.celeryapp import app -from onadata.libs.permissions import (ROLES, OwnerRole, - get_object_users_with_permissions, - get_role, is_organization) +from onadata.libs.permissions import ( + ROLES, + OwnerRole, + get_object_users_with_permissions, + get_role, + is_organization, +) from onadata.libs.utils.common_tags import API_TOKEN, OWNER_TEAM_NAME from onadata.libs.utils.common_tools import report_exception @@ -201,8 +205,14 @@ def assign_change_asset_permission( ) return resp + @app.task(bind=True, max_retries=3) -def propagate_project_permissions_async(self, project_id: int, headers: Optional[dict] = None, use_asset_owner_auth: bool = True): +def propagate_project_permissions_async( + self, + project_id: int, + headers: Optional[dict] = None, + use_asset_owner_auth: bool = True, +): """ Asynchronously propagates Project Permissions to the Formbuilder assets within the project """