From b0dd744a5cadd231a5bf86f03987942606e8f3c1 Mon Sep 17 00:00:00 2001 From: OdinsPlasmaRifle Date: Wed, 12 Aug 2020 11:52:34 +0200 Subject: [PATCH] Fixed to internal value for timestamp field to support millisecond db storage --- drf_rehive_extras/fields.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drf_rehive_extras/fields.py b/drf_rehive_extras/fields.py index 686dd8b..36564e6 100644 --- a/drf_rehive_extras/fields.py +++ b/drf_rehive_extras/fields.py @@ -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): diff --git a/setup.py b/setup.py index 5f3e172..562a7f0 100644 --- a/setup.py +++ b/setup.py @@ -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()