A supply nobody could read is unknown, not empty

This commit is contained in:
2026-08-21 11:44:10 -04:00
parent 65312c0502
commit bbda5cbfe9
6 changed files with 277 additions and 12 deletions

View File

@@ -323,7 +323,9 @@ class PrintersPlugin(BasePlugin):
click.echo(f'Supply levels for {ip}:')
for supply in supplies:
click.echo(f" {supply['name']}: {supply['level']}%")
level = supply.get('level')
shown = 'unknown' if level is None else f'{level}%'
click.echo(f" {supply['name']}: {shown}")
@printerscli.command('seed-supplies')
def seedsuppliescommand():