Fix archive (dup requests), + fix broken link
This commit is contained in:
parent
e27a340c06
commit
03d23cfaab
@ -220,15 +220,18 @@ class BaseArchiver(object):
|
|||||||
|
|
||||||
def create_obj_archive(self, oid: int, description: str):
|
def create_obj_archive(self, oid: int, description: str):
|
||||||
"""Creates a new archive for this object and returns its id."""
|
"""Creates a new archive for this object and returns its id."""
|
||||||
|
# id suffixé par YYYY-MM-DD-hh-mm-ss
|
||||||
archive_id = (
|
archive_id = (
|
||||||
self.get_obj_dir(oid)
|
self.get_obj_dir(oid)
|
||||||
+ os.path.sep
|
+ os.path.sep
|
||||||
+ "-".join(["%02d" % x for x in time.localtime()[:6]])
|
+ "-".join(["{x:02d}" for x in time.localtime()[:6]])
|
||||||
)
|
)
|
||||||
log(f"creating archive: {archive_id}")
|
log(f"creating archive: {archive_id}")
|
||||||
try:
|
try:
|
||||||
scu.GSL.acquire()
|
scu.GSL.acquire()
|
||||||
os.mkdir(archive_id) # if exists, raises FileExistsError
|
os.mkdir(archive_id)
|
||||||
|
except FileExistsError: # directory already exists !
|
||||||
|
pass
|
||||||
finally:
|
finally:
|
||||||
scu.GSL.release()
|
scu.GSL.release()
|
||||||
self.store(archive_id, "_description.txt", description)
|
self.store(archive_id, "_description.txt", description)
|
||||||
|
@ -333,7 +333,7 @@ def formsemestre_pvjury_pdf(formsemestre_id, group_ids: list[int] = None, etudid
|
|||||||
# PV pour ce seul étudiant:
|
# PV pour ce seul étudiant:
|
||||||
etud = Identite.query.get_or_404(etudid)
|
etud = Identite.query.get_or_404(etudid)
|
||||||
etuddescr = f"""<a class="discretelink" href="{
|
etuddescr = f"""<a class="discretelink" href="{
|
||||||
url_for("notes.ficheEtud", scodoc_dept=g.scodoc_dept, etudid=etudid)
|
url_for("scolar.ficheEtud", scodoc_dept=g.scodoc_dept, etudid=etudid)
|
||||||
}">{etud.nomprenom}</a>"""
|
}">{etud.nomprenom}</a>"""
|
||||||
etudids = [etudid]
|
etudids = [etudid]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user