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

Commit

Permalink
Correct update_date_complete()'s arguments that are optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
lefcha committed Oct 12, 2015
1 parent 838d83d commit 5742448
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions todoist/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,18 @@ def uncomplete(self, update_item_orders=1, restore_state=None):
self.data['item_order'] = restore_state[self['id']][2]
self.data['indent'] = restore_state[self['id']][3]

def update_date_complete(self, new_date_utc, date_string, is_forward):
def update_date_complete(self, new_date_utc=None, date_string=None,
is_forward=None):
"""
Completes a recurring task, and appends the equivalent request to the
queue.
"""
self.api.items.update_date_complete(self['id'], new_date_utc,
date_string, is_forward)
self.data['new_date_utc'] = new_date_utc
self.data['date_string'] = date_string
self.data['is_forward'] = is_forward
if new_date_utc:
self.data['due_date_utc'] = new_date_utc
if date_string:
self.data['date_string'] = date_string


class Label(Model):
Expand Down

0 comments on commit 5742448

Please sign in to comment.