Merge pull request #117 from hongwei1/master

bugfix/tweaked the date format for getMetric
This commit is contained in:
Simon Redfern 2020-11-20 09:45:03 +01:00 committed by GitHub
commit 45cca70d36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,7 @@ class MetricsView(LoginRequiredMixin, TemplateView):
"""
for metric in metrics:
metric['date'] = datetime.datetime.strptime(
metric['date'], '%Y-%m-%dT%H:%M:%S.%fZ')
metric['date'], settings.API_DATETIMEFORMAT)
return metrics
def to_api(self, cleaned_data):