Fix 2 typos
This commit is contained in:
parent
b13d4df370
commit
9d2148ae69
@ -218,7 +218,7 @@ def user_password(uid: int):
|
||||
@permission_required(Permission.ScoSuperAdmin)
|
||||
@as_json
|
||||
def user_role_add(uid: int, role_name: str, dept: str = None):
|
||||
"""Add a role to the user"""
|
||||
"""Add a role in the given dept to the user"""
|
||||
user: User = User.query.get_or_404(uid)
|
||||
role: Role = Role.query.filter_by(name=role_name).first_or_404()
|
||||
if dept is not None: # check
|
||||
@ -247,7 +247,7 @@ def user_role_add(uid: int, role_name: str, dept: str = None):
|
||||
@permission_required(Permission.ScoSuperAdmin)
|
||||
@as_json
|
||||
def user_role_remove(uid: int, role_name: str, dept: str = None):
|
||||
"""Remove the role from the user"""
|
||||
"""Remove the role (in the given dept) from the user"""
|
||||
user: User = User.query.get_or_404(uid)
|
||||
role: Role = Role.query.filter_by(name=role_name).first_or_404()
|
||||
if dept is not None: # check
|
||||
|
@ -306,7 +306,7 @@ def formsemestre_bulletinetud_published_dict(
|
||||
appreciations = BulAppreciations.get_appreciations_list(formsemestre.id, etudid)
|
||||
d["appreciation"] = [
|
||||
{
|
||||
"comment": quote_xml_attr(appreciation["comment"]),
|
||||
"comment": quote_xml_attr(appreciation.comment),
|
||||
"date": appreciation.date.isoformat() if appreciation.date else "",
|
||||
}
|
||||
for appreciation in appreciations
|
||||
|
@ -1102,9 +1102,7 @@ def partition_set_attr(partition_id, attr, value):
|
||||
db.session.add(partition)
|
||||
db.session.commit()
|
||||
# invalid bulletin cache
|
||||
sco_cache.invalidate_formsemestre(
|
||||
formsemestre_id=partition.formsemestre.id["formsemestre_id"]
|
||||
)
|
||||
sco_cache.invalidate_formsemestre(formsemestre_id=partition.formsemestre.id)
|
||||
return "enregistré"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user