Skip to content

Commit

Permalink
Removed conditional expression for Python2.4 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Boxall committed May 28, 2009
1 parent dcccf0f commit 13959a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pro/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def clean(self, value):
class CreditCardExpiryWidget(forms.MultiWidget):
"""MultiWidget for representing credit card expiry date."""
def decompress(self, value):
return [value.month, value.year] if value else [None, None]
if value:
return [value.month, value.year]
else:
return [None, None]

def format_output(self, rendered_widgets):
html = u' / '.join(rendered_widgets)
Expand Down

0 comments on commit 13959a8

Please sign in to comment.