Skip to content

Commit

Permalink
mês final de publicação retorna u"00" caso não informado.
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavofonseca committed Feb 18, 2014
1 parent a159e86 commit 14c8a12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions delorean/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def get_data(self, obj):
])

# Formating publication date, must have 00 for the days digits.
pub_month = "%02d" % obj['publication_end_month']
pub_month = "%02d" % obj['publication_end_month'] or u'00'
obj['publication_date'] = unicode(obj['publication_year']) + pub_month + u'00'

sections = {}
Expand Down Expand Up @@ -352,7 +352,7 @@ def get_data(self, obj):

for lang in ['pt_BR', 'en_US', 'es_ES']:
numeric_start_month = obj['publication_start_month']
numeric_end_month = obj['publication_end_month']
numeric_end_month = obj['publication_end_month'] or u'00'

if numeric_start_month in range(1, 13):
start_month = MONTH_ABBREVS[lang][numeric_start_month]
Expand Down

0 comments on commit 14c8a12

Please sign in to comment.