Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Commit

Permalink
fixed arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
n-zav committed Sep 11, 2015
1 parent fd01285 commit 58c956a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion closeio/closeio.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def get_activity_email(self, lead_id):

@parse_response
@handle_errors
def create_activity_call(self, lead_id, **kwargs):
def create_activity_call(self, **kwargs):
self._api.activity.call.post(kwargs)

@parse_response
Expand Down
11 changes: 6 additions & 5 deletions closeio/contrib/testing_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,16 @@ def delete_lead(self, lead_id):
del leads[lead_id]

@parse_response
def create_activity_email(self, lead_id, **kwargs):
def create_activity_email(self, **kwargs):
kwargs.setdefault('status', 'draft')

emails = self._data('activity_emails', {})

email = kwargs
lead_id = email['lead_id']
if lead_id not in emails:
emails[lead_id] = []

email = kwargs

template_id = email.get('template_id', None)
if template_id:
template = self.get_email_template(template_id)
Expand All @@ -265,14 +265,15 @@ def create_activity_email(self, lead_id, **kwargs):
emails[lead_id].append(email)

@parse_response
def create_activity_call(self, lead_id, **kwargs):
def create_activity_call(self, **kwargs):

calls = self._data('activity_calls', {})
call = kwargs
lead_id = call['lead_id']

if lead_id not in calls:
calls[lead_id] = []

call = kwargs
calls[lead_id].append(call)

@parse_response
Expand Down

0 comments on commit 58c956a

Please sign in to comment.