fix: BUG-073 (broken imports), BUG-009 (contact folders id=None), BUG-014 (tags assign 500), BUG-016 (search performance use_ai), BUG-030 (user delete GRANT DELETE), BUG-052 (miniapps response), BUG-047 (approval_requests columns), BUG-037 (compliance refresh), prestart.sh GRANT DELETE
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
This commit is contained in:
@@ -444,14 +444,15 @@ async def _handle_crm(
|
||||
result = await update_contact(db, tenant_id, uuid.UUID(entity_id), data)
|
||||
return StepResult(output={"contact": result} if result else {})
|
||||
elif action == "create_company":
|
||||
from app.services.company_service import create_company
|
||||
result = await create_company(db, tenant_id, data)
|
||||
from app.services.contact_service import create_contact
|
||||
company_data = {**data, "type": "company"}
|
||||
result = await create_contact(db, tenant_id, company_data)
|
||||
return StepResult(output={"company": result} if result else {})
|
||||
elif action == "update_company":
|
||||
from app.services.company_service import update_company
|
||||
from app.services.contact_service import update_contact
|
||||
if not entity_id:
|
||||
return StepResult(error="update_company requires entity_id", abort=True)
|
||||
result = await update_company(db, tenant_id, uuid.UUID(entity_id), data)
|
||||
result = await update_contact(db, tenant_id, uuid.UUID(entity_id), data)
|
||||
return StepResult(output={"company": result} if result else {})
|
||||
else:
|
||||
return StepResult(error=f"unknown crm action: {action}", abort=True)
|
||||
|
||||
Reference in New Issue
Block a user