示例#1
0
 def _get_screenshot_user(self) -> User:
     user = (self._session.query(User).filter(
         User.username ==
         app.config["THUMBNAIL_SELENIUM_USER"]).one_or_none())
     if not user:
         raise ReportScheduleSelleniumUserNotFoundError()
     return user
示例#2
0
 def _get_user() -> User:
     user = security_manager.find_user(
         username=app.config["THUMBNAIL_SELENIUM_USER"]
     )
     if not user:
         raise ReportScheduleSelleniumUserNotFoundError()
     return user