Fix JSON exports

This commit is contained in:
Emmanuel Viennet 2021-07-26 10:50:22 +03:00
parent a07571494c
commit d45f9e25cc
3 changed files with 3 additions and 3 deletions

View File

@ -598,7 +598,7 @@ class GenTable(object):
v = str(v) v = str(v)
r[cid] = v r[cid] = v
d.append(r) d.append(r)
return json.dumps(d, encoding=scu.SCO_ENCODING) return json.dumps(d)
def make_page( def make_page(
self, self,

View File

@ -70,7 +70,7 @@ def make_json_formsemestre_bulletinetud(
if REQUEST: if REQUEST:
REQUEST.RESPONSE.setHeader("content-type", scu.JSON_MIMETYPE) REQUEST.RESPONSE.setHeader("content-type", scu.JSON_MIMETYPE)
return json.dumps(d, cls=scu.ScoDocJSONEncoder, encoding=scu.SCO_ENCODING) return json.dumps(d, cls=scu.ScoDocJSONEncoder)
# (fonction séparée: n'utilise pas formsemestre_bulletinetud_dict() # (fonction séparée: n'utilise pas formsemestre_bulletinetud_dict()

View File

@ -86,7 +86,7 @@ class ScoDocCache:
def set(cls, oid, value): def set(cls, oid, value):
"""Store value""" """Store value"""
key = cls._get_key(oid) key = cls._get_key(oid)
# log(f"CACHE key={key}, timeout={cls.timeout}") # log(f"CACHE key={key}, type={type(value)}, timeout={cls.timeout}")
status = CACHE.set(key, value, timeout=cls.timeout) status = CACHE.set(key, value, timeout=cls.timeout)
if not status: if not status:
log("Error: cache set failed !") log("Error: cache set failed !")