Commit af337ba
authored
fix: preserve empty property values in CLI (#3745)
<!--
Thanks for opening a pull request!
-->
# Rationale for this change
The `properties get table` and `properties get namespace` commands used
a truthy check for property lookups. As a result, an existing property
with an empty string value was reported as missing.
This changes both lookups to check explicitly for `None`, preserving
empty strings while keeping the existing error for missing properties.
Related to #3713.
## Are these changes tested?
Yes. Added CLI regression tests for empty table and namespace property
values.
- `make lint`
- `uv run python -m pytest tests/cli/test_console.py`
## Are there any user-facing changes?
Yes. The table and namespace property commands now return an existing
empty string value instead of raising `NoSuchPropertyException`.
<!-- In the case of user-facing changes, please add the changelog label.
-->1 parent 07e5791 commit af337ba
2 files changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
| 331 | + | |
331 | 332 | | |
332 | 333 | | |
333 | 334 | | |
| |||
348 | 349 | | |
349 | 350 | | |
350 | 351 | | |
351 | | - | |
| 352 | + | |
| 353 | + | |
352 | 354 | | |
353 | 355 | | |
354 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
443 | 458 | | |
444 | 459 | | |
445 | 460 | | |
| |||
482 | 497 | | |
483 | 498 | | |
484 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
485 | 509 | | |
486 | 510 | | |
487 | 511 | | |
| |||
0 commit comments