diff --git a/lnbits/core/models/misc.py b/lnbits/core/models/misc.py index e733e971..dd093099 100644 --- a/lnbits/core/models/misc.py +++ b/lnbits/core/models/misc.py @@ -1,7 +1,9 @@ from __future__ import annotations +from dataclasses import dataclass from typing import Callable +import bcrypt from pydantic import BaseModel @@ -9,6 +11,15 @@ def _do_nothing(*_): pass +@dataclass +class SolveBugBcryptWarning: + __version__: str = getattr(bcrypt, "__version__") # noqa + + +# fix annoying warning in the logs +setattr(bcrypt, "__about__", SolveBugBcryptWarning()) # noqa + + class CoreAppExtra: register_new_ext_routes: Callable = _do_nothing register_new_ratelimiter: Callable