This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scripts.utils import ScriptRunner | |
from carta_identity.filters.user import EmailFilter as PrimaryEmailFilter, IsActiveFilter | |
from fund_admin.identity import get_carta_identity_client | |
from fund_admin.express.task_management.services import WorkflowService | |
from fund_admin.express.task_management.constants import WorkflowTemplateName | |
from fund_admin.approvers.models import DesignatedApprover | |
from fund_admin.fund_admin.models import Firm, Fund, FundFamily | |
from django.db.models import Q | |
class RemoveDesignatedApprover(ScriptRunner): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fund_admin.fund_admin.models import Fund | |
from fund_admin.fund_properties.amendable_properties.models import FundTerms | |
from fund_admin.fund_properties.amendable_properties.models import LPADocuments | |
terms = FundTerms.objects.filter(domicile_country__isnull=True, country__isnull=False, country="US").order_by('created_at') | |
print(f"Num Terms to Update: {terms.count()}") | |
if terms.count() > 0: | |
for term in terms: | |
lpa_document = LPADocuments.objects.get(pk=term.lpa_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import transaction | |
from fund_admin.express.task_management.services import WorkflowService | |
from fund_admin.express.task_management.constants import WorkflowStatus, WorkflowTemplateName, TaskStatus | |
from fund_admin.reporting.models.package import FinancialPackageReport | |
@transaction.atomic | |
def force_complete_workflow_for_package(package_id): | |
workflow = WorkflowService().get_active_workflow_for_object( | |
str(package_id), | |
FinancialPackageReport._meta.label, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fund_admin.reporting.tasks import regenerate_financial_package | |
from fund_admin.reporting.constants import FinancialReportExportType | |
regenerate_financial_package( | |
package_id=43550, | |
user_id=0, | |
export_type=FinancialReportExportType.SEND_FOR_APPROVAL, | |
capital_account_fund_uuids=None | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fund_admin.express.task_management.services import TaskService, WorkflowService | |
from fund_admin.express.task_management.constants import WorkflowStatus | |
from fund_admin.reporting.services import FinancialPackageService | |
from fund_admin.fund_properties.amendable_properties.services import FundPropertiesService | |
from fund_admin.reporting.services.financial_package.express import TaskTemplate | |
workflow_template = "publish-financial-package" | |
object_type = "reporting.FinancialPackageReport" | |
gp_publish_tasks_with_incorrect_due_date = list() |
OlderNewer