forked from ScoDoc/ScoDoc
fixes: clonage et nouvelles versions programmes OK
This commit is contained in:
parent
357b6f1a7f
commit
504a15fc8c
@ -99,7 +99,7 @@ def do_module_list(context, *args, **kw):
|
||||
return _moduleEditor.list(cnx, *args, **kw)
|
||||
|
||||
|
||||
def do_module_create(context, args):
|
||||
def do_module_create(context, args) -> int:
|
||||
"create a module"
|
||||
# create
|
||||
from app.scodoc import sco_formations
|
||||
|
@ -223,7 +223,7 @@ def formation_import_xml(context, doc: str, import_tags=True):
|
||||
mod_info[1]["ue_id"] = ue_id
|
||||
mod_id = sco_edit_module.do_module_create(context, mod_info[1])
|
||||
if xml_module_id:
|
||||
modules_old2new[xml_module_id] = mod_id
|
||||
modules_old2new[int(xml_module_id)] = mod_id
|
||||
if import_tags:
|
||||
if len(mod_info) > 2:
|
||||
tag_names = [t[1]["name"] for t in mod_info[2]]
|
||||
|
@ -35,6 +35,8 @@
|
||||
"""
|
||||
import http
|
||||
|
||||
from flask import g, url_for
|
||||
|
||||
import app.scodoc.sco_utils as scu
|
||||
import app.scodoc.notesdb as ndb
|
||||
from app.scodoc.notes_log import log
|
||||
@ -75,7 +77,7 @@ class ScoTag(object):
|
||||
r = ndb.SimpleDictFetch(
|
||||
"SELECT id as tag_id, * FROM "
|
||||
+ self.tag_table
|
||||
+ " WHERE dept_id=%(dept_id) AND title = %(title)s",
|
||||
+ " WHERE dept_id=%(dept_id)s AND title = %(title)s",
|
||||
{"dept_id": g.scodoc_dept_id, "title": self.title},
|
||||
)
|
||||
if r:
|
||||
|
Loading…
Reference in New Issue
Block a user