forked from ScoDoc/ScoDoc
Fix JSON exports
This commit is contained in:
parent
a07571494c
commit
d45f9e25cc
@ -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,
|
||||
|
@ -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()
|
||||
|
@ -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 !")
|
||||
|
Loading…
Reference in New Issue
Block a user