Skip to content

Commit

Permalink
Fix mypy in providers/salesforce (#20325)
Browse files Browse the repository at this point in the history
  • Loading branch information
subkanthi committed Dec 16, 2021
1 parent 4b8a120 commit 92bc804
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(
*,
endpoint: str,
method: str = 'GET',
payload: dict = None,
payload: dict,
salesforce_conn_id: str = 'salesforce_default',
**kwargs,
) -> None:
Expand All @@ -59,8 +59,11 @@ def execute(self, context: dict) -> dict:
:return: Apex response
:rtype: dict
"""
result: dict = {}
sf_hook = SalesforceHook(salesforce_conn_id=self.salesforce_conn_id)
conn = sf_hook.get_conn()
result = conn.apexecute(action=self.endpoint, method=self.method, data=self.payload)
execution_result = conn.apexecute(action=self.endpoint, method=self.method, data=self.payload)
if self.do_xcom_push:
return result
result = execution_result

return result

0 comments on commit 92bc804

Please sign in to comment.