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)
|
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,
|
||||||
|
@ -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()
|
||||||
|
@ -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 !")
|
||||||
|
Loading…
Reference in New Issue
Block a user