fix: update DocumentSync initialization to pass EspoCRMAPI as first argument
This commit is contained in:
@@ -56,8 +56,10 @@ async def handler(event_data: Dict[str, Any], ctx: FlowContext[Any]) -> None:
|
|||||||
ctx.logger.info(f"Document ID: {entity_id}")
|
ctx.logger.info(f"Document ID: {entity_id}")
|
||||||
ctx.logger.info("=" * 80)
|
ctx.logger.info("=" * 80)
|
||||||
|
|
||||||
# Initialize sync utils
|
# Initialize sync utils (EspoCRMAPI must be passed as first arg, not ctx)
|
||||||
sync_utils = DocumentSync(ctx)
|
from services.espocrm import EspoCRMAPI
|
||||||
|
espocrm = EspoCRMAPI(ctx)
|
||||||
|
sync_utils = DocumentSync(espocrm, context=ctx)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Step 1: Get download info from EspoCRM
|
# Step 1: Get download info from EspoCRM
|
||||||
|
|||||||
Reference in New Issue
Block a user