Skip to content

Commit

Permalink
Fixed to internal value for timestamp field to support millisecond db…
Browse files Browse the repository at this point in the history
… storage
  • Loading branch information
OdinsPlasmaRifle committed Aug 12, 2020
1 parent bb800cc commit b0dd744
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drf_rehive_extras/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def to_internal_value(self, obj):
except ValueError:
_('Incorrect date format, must be a valid unix timestamp.')

return make_aware(datetime.fromtimestamp(int(date)))
return make_aware(datetime.fromtimestamp(date))


class EnumField(serializers.ChoiceField):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import find_packages, setup


VERSION = '0.0.9'
VERSION = '0.0.10'

with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
Expand Down

0 comments on commit b0dd744

Please sign in to comment.