From 35b1160142878342a8a1b4d360fc420c22b962bb Mon Sep 17 00:00:00 2001 From: Danny McVey Date: Thu, 5 Feb 2026 19:43:01 -0800 Subject: [PATCH] Fix zero feature counts in layer summaries --- cli/arcgispro_cli/commands/inspect.py | 3 ++- cli/arcgispro_cli/commands/query.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/arcgispro_cli/commands/inspect.py b/cli/arcgispro_cli/commands/inspect.py index cb098fa..3256a18 100644 --- a/cli/arcgispro_cli/commands/inspect.py +++ b/cli/arcgispro_cli/commands/inspect.py @@ -110,7 +110,8 @@ def inspect_cmd(path, no_suggestions): for layer in layers[:15]: # Limit to first 15 visible = "✓" if layer.get("isVisible") else "✗" broken = " [red]⚠[/red]" if layer.get("isBroken") else "" - features = f"{layer.get('featureCount', '-'):,}" if layer.get('featureCount') else "-" + feature_count = layer.get("featureCount") + features = f"{feature_count:,}" if feature_count is not None else "-" table.add_row( f"{layer.get('name', 'Unknown')}{broken}", diff --git a/cli/arcgispro_cli/commands/query.py b/cli/arcgispro_cli/commands/query.py index 764ab7e..422a7bb 100644 --- a/cli/arcgispro_cli/commands/query.py +++ b/cli/arcgispro_cli/commands/query.py @@ -177,7 +177,8 @@ def layers_cmd(path, map_name, broken, as_json): for layer in layers: visible = "✓" if layer.get("isVisible") else "" broken_mark = " ⚠" if layer.get("isBroken") else "" - features = f"{layer.get('featureCount', '-'):,}" if layer.get('featureCount') else "-" + feature_count = layer.get("featureCount") + features = f"{feature_count:,}" if feature_count is not None else "-" table.add_row( f"{layer.get('name', 'Unknown')}{broken_mark}",