Skip to content

Commit

Permalink
Try to handle decimal columns for postgresql where the decimal precis…
Browse files Browse the repository at this point in the history
…ion is returned as a negative number but should be a positive one

This is issue 97
http://code.google.com/p/django-command-extensions/issues/detail?id=97

Signed-off-by: trbs <[email protected]>
  • Loading branch information
Jehiah Czebotar authored and trbs committed Jul 31, 2009
1 parent a6bb86d commit ce6157e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_extensions/management/commands/sqldiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def get_field_db_type(self, description, field=None, table_name=None):

if reverse_type == "DecimalField":
kwargs['max_digits'] = description[4]
kwargs['decimal_places'] = description[5]
kwargs['decimal_places'] = abs(description[5])

if description[6]:
kwargs['blank'] = True
Expand Down

0 comments on commit ce6157e

Please sign in to comment.