mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-16 07:15:26 -05:00
fix: strict optional errors (#1759)
* fix strict optional errors * fix typing in repository * fix backup db files location * update workspace settings
This commit is contained in:
@@ -3,6 +3,17 @@ from sqlite3 import IntegrityError
|
||||
from mealie.lang.providers import Translator
|
||||
|
||||
|
||||
class UnexpectedNone(Exception):
|
||||
"""Exception raised when a value is None when it should not be."""
|
||||
|
||||
def __init__(self, message: str = "Unexpected None Value"):
|
||||
self.message = message
|
||||
super().__init__(self.message)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.message}"
|
||||
|
||||
|
||||
class PermissionDenied(Exception):
|
||||
"""
|
||||
This exception is raised when a user tries to access a resource that they do not have permission to access.
|
||||
|
||||
Reference in New Issue
Block a user