Skip to content

Fix admin settings save 500 error (v0.250.005) - #982

Merged
Bionic711 merged 3 commits into
microsoft:Developmentfrom
Xeelee33:fix-admin-settings-save
Jun 30, 2026
Merged

Bionic711 merged 3 commits into
microsoft:Developmentfrom
Xeelee33:fix-admin-settings-save

Conversation

@chadpalmer

Copy link
Copy Markdown
Contributor

Summary

This PR fixes an HTTP 500 error on the /admin/settings POST route and wires the change into versioning, fix documentation, and release notes.

Changes

  • Replace the undefined app symbol in route_frontend_admin_settings.py with Flask's current_app when regenerating custom logo and favicon files after a successful settings update.
  • Bump the application VERSION from 0.250.004 to 0.250.005 in application/single_app/config.py.
  • Add docs/explanation/fixes/ADMIN_SETTINGS_SAVE_500_FIX.md documenting the issue, root cause, fix, and guardrail checks.
  • Add a v0.250.005 Bug Fixes entry to docs/explanation/release_notes.md describing the Admin Settings save 500 fix.

Validation

  • python -m py_compile application/single_app/route_frontend_admin_settings.py
  • python scripts/check_swagger_routes.py application/single_app/route_frontend_admin_settings.py
  • python scripts/check_broken_access_control.py --full-file application/single_app/route_frontend_admin_settings.py
  • python scripts/check_xss_sinks.py --full-file application/single_app/route_frontend_admin_settings.py
  • git diff --check upstream/Development...HEAD

All checks passed.

Impact

  • Admins no longer see an HTTP 500 when saving Admin Settings; the route now returns a successful response while still persisting settings and regenerating logo/favicon files.
  • Change is low risk and scoped to the post-save path of the admin settings route.

@chadpalmer

Copy link
Copy Markdown
Contributor Author

Paul Lizer (@paullizer) Bionic711 I ran this PR through the new PR check and all the tests/checks passed.

@Bionic711

Copy link
Copy Markdown
Collaborator

Chad Palmer (@chadpalmer) In your test_route_blueprint_policy_inventory.py, update this method:

def test_route_policy_inventory_assets_and_version_are_current() -> None:
    """Verify the route policy test folder and config version reader are wired correctly."""
    version_parts = read_config_version().split(".")
    assert len(version_parts) == 3
    assert all(part.isdigit() for part in version_parts)
    assert Path(__file__).parent.name == "route_tests"

The current version is brittle (hardcoded version I as testing and forgot to fix it), and we missed it but that is what is causing the pipeline failure. Once you get that done, Paul Lizer (@paullizer) will have to bypass the checks to pull this in which will fix that check.

@chadpalmer

Copy link
Copy Markdown
Contributor Author

Chad Palmer (@chadpalmer) In your test_route_blueprint_policy_inventory.py, update this method:

def test_route_policy_inventory_assets_and_version_are_current() -> None:
    """Verify the route policy test folder and config version reader are wired correctly."""
    version_parts = read_config_version().split(".")
    assert len(version_parts) == 3
    assert all(part.isdigit() for part in version_parts)
    assert Path(__file__).parent.name == "route_tests"

The current version is brittle (hardcoded version I as testing and forgot to fix it), and we missed it but that is what is causing the pipeline failure. Once you get that done, Paul Lizer (@paullizer) will have to bypass the checks to pull this in which will fix that check.

Bionic711 I updated the test method you highlighted above. Please let me know if you need any more updates. Thanks!

@Bionic711
Bionic711 merged commit eabe9fd into microsoft:Development Jun 30, 2026
7 checks passed
@paullizer

Copy link
Copy Markdown
Contributor

Awesome Chad Palmer (@chadpalmer)! I appreciate getting on this so quickly.

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.

3 participants