github dmellok/tesserae v0.50.2
v0.50.2 — Rotation/schedule edit form 500 on saved conditions

latest releases: v0.259.0, mcp-v0.12.0, mcp-v0.11.0...
one month ago

Fixed

  • Editing a rotation or schedule after saving any condition no longer 500s.
    Both edit forms seed their conditions textarea via {{ step.conditions | tojson }}. Flask's default JSON provider couldn't serialise Pydantic v2 Condition instances, so the second a step gained a saved condition, the next edit re-render raised Object of type Condition is not JSON serializable and hit the 500 page.

    Fixed by installing a JSONProvider subclass in create_app() that defers BaseModel instances to model_dump() before falling through to the default. One-place patch, covers both /rotations and /schedules at the source, and any future jsonify(model) use site for free.

Test coverage

Two regression tests in tests/test_rotation_routes.py:

  • Save a rotation with a time_window condition → GET /rotations?edit=<id> returns 200 with the condition data round-tripped through the textarea.
  • Same shape for /schedules?edit=<id> with a sun condition.

Re-test in your install

Edit any rotation or schedule that already has a saved condition. The form should load cleanly instead of throwing a 500.

Full Changelog: v0.50.1...v0.50.2

Don't miss a new tesserae release

NewReleases is sending notifications on new releases.