Commit 435df944 authored by Giannis Tsapelas's avatar Giannis Tsapelas
Browse files

fixed date issue

parent 0d98e805
Pipeline #6922 failed with stages
in 53 seconds
......@@ -7,7 +7,7 @@ from query_designer.models import Query
import time
from threading import Thread
import json
import sys
import os
from django.db import connections, ProgrammingError
......@@ -104,6 +104,7 @@ def process(self, dimension_values='', variable='', only_headers=False, commit=T
results = all_rows
# include dimension values if requested
for d_name in dimension_values:
hdx, header = [hi for hi in enumerate(
......@@ -25,6 +25,8 @@ class ResultEncoder(json.JSONEncoder):
return float(obj)
elif isinstance(obj, datetime.datetime):
return obj.isoformat() + ('Z' if self.mode == 'solr' else '')
elif isinstance(obj,
return obj.isoformat()
return json.JSONEncoder.default(self, obj)
......@@ -36,5 +38,6 @@ class PostgresResultEncoder(ResultEncoder):
class SolrResultEncoder(ResultEncoder):
mode = 'solr'
class PrestoResultEncoder(ResultEncoder):
mode = 'presto'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment