From d45f9e25cc1ecb28001567e0b0bc8c7174987fdc Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 26 Jul 2021 10:50:22 +0300 Subject: [PATCH] Fix JSON exports --- app/scodoc/gen_tables.py | 2 +- app/scodoc/sco_bulletins_json.py | 2 +- app/scodoc/sco_cache.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/scodoc/gen_tables.py b/app/scodoc/gen_tables.py index b0bb6cc0..fcca48af 100644 --- a/app/scodoc/gen_tables.py +++ b/app/scodoc/gen_tables.py @@ -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, diff --git a/app/scodoc/sco_bulletins_json.py b/app/scodoc/sco_bulletins_json.py index 2c103f09..7e0e18ff 100644 --- a/app/scodoc/sco_bulletins_json.py +++ b/app/scodoc/sco_bulletins_json.py @@ -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() diff --git a/app/scodoc/sco_cache.py b/app/scodoc/sco_cache.py index e57400c3..3a3fdec4 100644 --- a/app/scodoc/sco_cache.py +++ b/app/scodoc/sco_cache.py @@ -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 !")