Ticket #4485: decimalfield_null.diff
File decimalfield_null.diff, 546 bytes (added by , 17 years ago) |
---|
-
django/db/models/fields/__init__.py
610 610 if value < 0: 611 611 num_chars += 1 612 612 613 return "%.*f" % (self.decimal_places, value) 613 if value is None: 614 return '' 615 else: 616 return "%.*f" % (self.decimal_places, value) 614 617 615 618 def get_db_prep_save(self, value): 616 619 if value is not None: