1
0
forked from ScoDoc/ScoDoc

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)
r[cid] = v
d.append(r)
return json.dumps(d, encoding=scu.SCO_ENCODING)
return json.dumps(d)
def make_page(
self,

View File

@ -70,7 +70,7 @@ def make_json_formsemestre_bulletinetud(
if REQUEST:
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()

View File

@ -86,7 +86,7 @@ class ScoDocCache:
def set(cls, oid, value):
"""Store value"""
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)
if not status:
log("Error: cache set failed !")