fix(py): make junior '?' cell text sticky across exception overrides
All checks were successful
Deploy to K8s / deploy (push) Successful in 8s
All checks were successful
Deploy to K8s / deploy (push) Successful in 8s
Go's build_juniors sets cellText = "?" + countStr whenever md.IsUnknown is true, regardless of whether an exception overrides the expected amount. Python was checking expected == "?" for this branch, but reconcile replaces expected with the exception amount (e.g. 0) before the view builder runs, so the "?" was silently dropped to "-". Fix: derive is_unknown from original_expected == "?" (set before exception substitution) instead of expected == "?". Also align the tooltip guard: Go only shows Received/Expected tooltip for non-unknown months (or when paid > 0), matching the same is_unknown flag. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -310,8 +310,9 @@ def build_juniors_view_model(
|
|||||||
cell_text = "-"
|
cell_text = "-"
|
||||||
amount_to_pay = 0
|
amount_to_pay = 0
|
||||||
|
|
||||||
if expected == "?" or (isinstance(expected, int) and expected > 0):
|
is_unknown = original_expected == "?"
|
||||||
if expected == "?":
|
if is_unknown or (isinstance(expected, int) and expected > 0):
|
||||||
|
if is_unknown:
|
||||||
status = "empty"
|
status = "empty"
|
||||||
cell_text = f"?{count_str}"
|
cell_text = f"?{count_str}"
|
||||||
elif paid >= expected:
|
elif paid >= expected:
|
||||||
@@ -339,7 +340,7 @@ def build_juniors_view_model(
|
|||||||
status = "surplus"
|
status = "surplus"
|
||||||
cell_text = f"PAID {paid}"
|
cell_text = f"PAID {paid}"
|
||||||
|
|
||||||
if (isinstance(expected, int) and expected > 0) or paid > 0:
|
if (not is_unknown and isinstance(expected, int) and expected > 0) or paid > 0:
|
||||||
tooltip = f"Received: {paid}, Expected: {expected}"
|
tooltip = f"Received: {paid}, Expected: {expected}"
|
||||||
else:
|
else:
|
||||||
tooltip = ""
|
tooltip = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user