Skip to content
Snippets Groups Projects

Reforma vyhodnocování práv

Closed Martin Mareš requested to merge mj/rights into master
1 unresolved thread
1 file
+ 3
1
Compare changes
  • Side-by-side
  • Inline
+ 3
1
@@ -4,12 +4,12 @@ from datetime import timedelta
import os
import secrets
from sqlalchemy import or_
from sqlalchemy.orm import joinedload
from typing import Optional, Dict, Callable, List
import mo
import mo.config as config
import mo.db as db
import mo.rights
import mo.util
from mo.util import logger
@@ -29,6 +29,7 @@ class TheJob:
job: db.Job
job_id: Optional[int]
gatekeeper: Optional[mo.rights.Gatekeeper]
errors: List[str]
def __init__(self, job_id: Optional[int] = None):
@@ -115,6 +116,7 @@ class TheJob:
sess.commit()
try:
self.gatekeeper = mo.rights.Gatekeeper(job.user)
_handler_table[job.type](self)
if self.errors:
logger.info(f'Job: Neúspěšně dokončen job #{job.job_id} ({job.result})')
Loading