Skip to content

Commit

Permalink
patch UserModel on logs (#4474)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoaquim authored Mar 14, 2023
1 parent 1be858c commit 0a15ec9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions openbb_terminal/core/log/generation/settings_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# IMPORTATION INTERNAL
from openbb_terminal import config_terminal as cfg
from openbb_terminal.core.log.generation.common import do_rollover
from openbb_terminal.core.models.credentials_model import CredentialsModel
from openbb_terminal.core.models.user_model import UserModel
from openbb_terminal.core.session.current_user import get_current_user
from openbb_terminal.terminal_helper import is_installer

Expand Down Expand Up @@ -89,10 +91,13 @@ def log_config_terminal() -> None:

for item in dir(cfg):
prop = getattr(cfg, item)
# pylint: disable=too-many-boolean-expressions
if (
not item.startswith("__")
and not isinstance(prop, FunctionType)
and not isinstance(prop, ModuleType)
and not isinstance(prop, UserModel)
and not isinstance(prop, CredentialsModel)
and not any(substring in item for substring in SENSITIVE_WORDS)
):
config_terminal_dict[item] = str(prop)
Expand All @@ -112,6 +117,8 @@ def log_feature_flags() -> None:
not item.startswith("__")
and not isinstance(prop, FunctionType)
and not isinstance(prop, ModuleType)
and not isinstance(prop, UserModel)
and not isinstance(prop, CredentialsModel)
):
feature_flags_dict[item] = str(prop)

Expand Down

0 comments on commit 0a15ec9

Please sign in to comment.