diff --git a/mo/web/org_certs.py b/mo/web/org_certs.py index 5ee6dd6592e533598ff3b45327470dbb27b4b2ba..56fc5f94d1ef27d0856c2a77941c3ad3d38fe0c5 100644 --- a/mo/web/org_certs.py +++ b/mo/web/org_certs.py @@ -150,9 +150,21 @@ def org_certificates(ct_id: int): if cfile: if approve_form.approve.data: cfile.approved = True + mo.util.log( + type=db.LogType.cert_set, + what=contest.contest_id, + details={'action': 'approve', 'reason': 'web'}, + ) + app.logger.info(f'Schváleny diplomy pro soutěž #{contest.contest_id}') flash(f'Diplomy ({ctype.friendly_name()}) schváleny.', 'success') elif approve_form.unapprove.data: cfile.approved = False + mo.util.log( + type=db.LogType.cert_set, + what=contest.contest_id, + details={'action': 'unapprove', 'reason': 'web'}, + ) + app.logger.info(f'Zrušeno schválení diplomů pro soutěž #{contest.contest_id}') flash(f'Odvoláno schválení diplomů ({ctype.friendly_name()}).', 'success') sess.commit() return redirect(ctx.url_for('org_certificates'))