Browse files

add formatter for payment_methods field

  • Loading branch information...
1 parent ab726e4 commit f272f1559ffb76095945c9804263c395ce5c905c @Akuryou Akuryou committed Dec 15, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 skrill/models.py
View
4 skrill/models.py
@@ -154,7 +154,9 @@ def _format_boolean(self, value):
def _get_formatted_field_value(self, field):
field_class = self._meta.get_field(field).__class__
field_value = getattr(self, field)
- if field_class == models.BooleanField:
+ if field == "payment_methods":
+ return ",".join(field_value)
+ elif field_class == models.BooleanField:
return self._format_boolean(field_value)
elif field_class == models.DateField:
return field_value.strftime("%d%m%Y")

0 comments on commit f272f15

Please sign in to comment.