Skip to content

Commit

Permalink
Fix issues not fixed in #100 (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
gouline authored Jul 5, 2022
1 parent b6bec9d commit ba44c1c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dbtmetabase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@ def process_value(self, ctx: click.Context, value: Any) -> Any:
if value is not None:
value = self.type_cast_value(ctx, value)

assert self.name, "none config option"

if (
isinstance(self.type, click.types.BoolParamType)
and ctx._parameter_source[f"{self.name}"]._name_ == "DEFAULT"
and ctx.get_parameter_source(self.name)
== click.core.ParameterSource.DEFAULT
and self.name in CONFIG
):
if self.name in CONFIG:
value = CONFIG[self.name]
value = CONFIG[self.name]

if self.required and self.value_is_missing(value):
if self.name not in CONFIG:
Expand Down

0 comments on commit ba44c1c

Please sign in to comment.