Skip to content

Commit

Permalink
fix #404: guard against adapters with no options (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
tconbeer authored Jan 11, 2024
1 parent 3a63442 commit 873b7ce
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ All notable changes to this project will be documented in this file.
- Harlequin now loads immediately and connects to your database in the background ([#393](https://github.com/tconbeer/harlequin/issues/393)).
- Harlequin shows a loading indicator before the Data Catalog is hydrated for the first time ([#396](https://github.com/tconbeer/harlequin/issues/396)).

### Bug Fixes

- Fixes a bug where `harlequin --config` would crash if configuring an adapter that declared no options.

## [1.9.2] - 2024-01-10

### Features
Expand Down
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pre-commit = "^3.3.1"
textual-dev = "^1.0.1"
harlequin-postgres = "^0.2"
harlequin-mysql = "^0.1.1"
harlequin-odbc = "^0.1.1"

[tool.poetry.group.static.dependencies]
black = "^23.3.0"
Expand Down
14 changes: 9 additions & 5 deletions src/harlequin/config_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,15 @@ def _wizard() -> None:
if adapter_cls.ADAPTER_OPTIONS is not None
else []
)
which = questionary.checkbox(
message="Which of the following adapter options would you like to set?",
choices=adapter_option_choices,
style=HARLEQUIN_QUESTIONARY_STYLE,
).unsafe_ask()

if adapter_option_choices:
which = questionary.checkbox(
message="Which of the following adapter options would you like to set?",
choices=adapter_option_choices,
style=HARLEQUIN_QUESTIONARY_STYLE,
).unsafe_ask()
else:
which = []

adapter_options = {}
if conn_str:
Expand Down

0 comments on commit 873b7ce

Please sign in to comment.