Skip to content

Commit

Permalink
'create_date' is evidently a typo
Browse files Browse the repository at this point in the history
I added an alias for backwards compatibility, is that needed?
  • Loading branch information
jean committed Jul 24, 2016
1 parent 8de0ac1 commit 571fb2c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions trello/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def get_stats_by_list(self, tz, lists, list_cmp=None, done_list=None, time_unit=
seconds_to_time_unit = lambda time: time / 3660.0

# Creation datetime of the card
creation_datetime = self.create_date
creation_datetime = self.created_date

#  Time in seconds stores the seconds that our card lives in a column
stats_by_list = {list_.id: {"time":0, "forward_moves":0, "backward_moves":0} for list_ in lists}
Expand Down Expand Up @@ -402,7 +402,7 @@ def latestCardMove_date(self):
return dateparser.parse(date_str)

@property
def create_date(self):
def created_date(self):
"""Will return the creation date of the card.
WARNING: if the card was create via convertion of a checklist item
Expand All @@ -413,6 +413,9 @@ def create_date(self):
date_str = self.actions[0]['date']
return dateparser.parse(date_str)

# backwards compatibility alias; TODO: deprecation message
create_date = created_date

@property
def card_created_date(self):
"""Will return the creation date of the card.
Expand Down

0 comments on commit 571fb2c

Please sign in to comment.