Skip to content

Fix web crash#4100

Merged
springfall2008 merged 2 commits into
mainfrom
fix/web_crash
Jun 20, 2026
Merged

Fix web crash#4100
springfall2008 merged 2 commits into
mainfrom
fix/web_crash

Conversation

@springfall2008

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 20, 2026 20:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a crash in the web UI “apps.yaml” renderer by guarding a substring check against non-string argument keys, and bumps the Predbat version to release the fix.

Changes:

  • Prevent TypeError in html_apps() by checking isinstance(arg, str) before using "_key" in arg-style substring tests.
  • Bump THIS_VERSION from v8.40.15 to v8.40.16.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
apps/predbat/web.py Adds a type guard to avoid crashing when args contains non-string keys while rendering the apps UI.
apps/predbat/predbat.py Increments the application version constant to ship the fix.

Comment thread apps/predbat/web.py
Comment on lines 3380 to 3384
for arg in args:
value = args[arg]
raw_value = self.resolve_value_raw(arg, value)
if ("_key" in arg) or ("_password" in arg) or ("_secret" in arg) or ("_pem" in arg):
if isinstance(arg, str) and (("_key" in arg) or ("_password" in arg) or ("_secret" in arg) or ("_pem" in arg)):
value = '<span title = "{}"> (hidden)</span>'.format(value)
@springfall2008 springfall2008 merged commit 5acf226 into main Jun 20, 2026
1 check passed
@springfall2008 springfall2008 deleted the fix/web_crash branch June 20, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants