From ad00f06663c988e56763cf2a71553780cb56651a Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 21 Sep 2022 11:35:02 +0200 Subject: [PATCH] Fix #497 (API modimpl) --- app/api/formations.py | 4 ++-- app/scodoc/sco_archives.py | 2 +- sco_version.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/api/formations.py b/app/api/formations.py index e87f9941..002ce739 100644 --- a/app/api/formations.py +++ b/app/api/formations.py @@ -280,5 +280,5 @@ def moduleimpl(moduleimpl_id: int): query = ModuleImpl.query.filter_by(id=moduleimpl_id) if g.scodoc_dept: query = query.join(FormSemestre).filter_by(dept_id=g.scodoc_dept_id) - modimpl = query.first_or_404() - return jsonify(modimpl.to_dict()) + modimpl: ModuleImpl = query.first_or_404() + return jsonify(modimpl.to_dict(convert_objects=True)) diff --git a/app/scodoc/sco_archives.py b/app/scodoc/sco_archives.py index ac795578..71acd815 100644 --- a/app/scodoc/sco_archives.py +++ b/app/scodoc/sco_archives.py @@ -231,7 +231,7 @@ class BaseArchiver(object): log(f"creating archive: {archive_id}") try: scu.GSL.acquire() - os.mkdir(archive_id) # if exists, raises an OSError + os.mkdir(archive_id) # if exists, raises FileExistsError finally: scu.GSL.release() self.store(archive_id, "_description.txt", description) diff --git a/sco_version.py b/sco_version.py index ed1190cd..9687e7ae 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.3.40" +SCOVERSION = "9.3.41" SCONAME = "ScoDoc"