Rename media buy status values for clarity #375
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Renames media buy status values to more clearly communicate their meaning:
"pending"→"ready"(scheduled to activate at flight start)"pending_manual"→"pending_approval"(requires manual approval)Changes
Status Terminology Updates
"ready" status - For media buys scheduled to start in the future
"pending_approval" status - For media buys requiring manual approval
Files Modified
src/core/schemas.py- UpdatedMediaBuyDeliveryDatastatus literal typesrc/core/main.py- Updated status assignment logic in 3 locations + valid_statuses listtemplates/media_buy_approval.html- Updated approval UI checks (2 locations)templates/workflows.html- Updated workflow status displaytests/unit/test_adcp_contract.py- Updated test with status_filtertests/integration/test_delivery_simulator_restart.py- Updated database querytests/integration/test_workflow_with_server.py- Updated status check logicTesting
✅ All unit tests pass (593 passed)
✅ All integration tests pass (192 passed)
✅ All AdCP contract tests pass (46 passed)
✅ No breaking changes to existing functionality
Impact
Migration Notes
If any external systems check for "pending" status, they should update to check for "ready" status instead.