diff --git a/src/server/BreCal/schemas/model.py b/src/server/BreCal/schemas/model.py index 86204d7..95f0553 100644 --- a/src/server/BreCal/schemas/model.py +++ b/src/server/BreCal/schemas/model.py @@ -45,16 +45,27 @@ class EvaluationType(IntEnum): yellow = 2 red = 3 + @classmethod + def _missing_(cls, value): + return cls.undefined + class NotificationType(IntEnum): undefined = 0 email = 1 push = 2 + @classmethod + def _missing_(cls, value): + return cls.undefined class ShipcallType(IntEnum): undefined = 0 arrival = 1 departure = 2 shifting = 3 + + @classmethod + def _missing_(cls, value): + return cls.undefined @dataclass