Skip to content

Commit

Permalink
Fix invalid Django 1.8 version check in MoneyField.value_to_string (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Stranger6667 committed Dec 23, 2018
1 parent 699d562 commit 1b07b3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion djmoney/models/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def formfield(self, **kwargs):
return super(MoneyField, self).formfield(**defaults)

def value_to_string(self, obj):
if VERSION == (1, 8):
if VERSION[:2] == (1, 8):
value = self._get_val_from_obj(obj)
else:
value = self.value_from_object(obj)
Expand Down
8 changes: 8 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
Changelog
=========

Unreleased
----------

Fixed
~~~~~

- Invalid Django 1.8 version check in ``djmoney.models.fields.MoneyField.value_to_string``. (`Stranger6667`_)

`0.14.3`_ - 2018-08-14
----------------------

Expand Down

0 comments on commit 1b07b3b

Please sign in to comment.