Skip to content

fix(deals): preserve template deal details on readback - #113

Open
aleksUIX wants to merge 1 commit into
IABTechLab:mainfrom
aleksUIX:fix/template-deal-readback
Open

aleksUIX wants to merge 1 commit into
IABTechLab:mainfrom
aleksUIX:fix/template-deal-readback

Conversation

@aleksUIX

@aleksUIX aleksUIX commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Deals created through /api/v1/deals/from-template return their product, price and flight details on creation, then lose them on GET because the response mapper only reads nested records.

The mapper now falls back to the stored flat fields when a nested section is absent. Nested sections keep precedence, including empty sections. The booked CPM becomes final_cpm; base_cpm stays unset when the original base price was not stored. No storage migration is needed.

Regression coverage includes the real POST-to-GET route, currency conversion, zero values, existing flat records and conflicting nested values. The new regression cases failed before the change.

Validation: 1,662 unit tests passed. Integration tests: 39 passed, 28 skipped under the repository's existing conditions. Ruff lint and the repository-wide format check passed. Hosted checks passed on Python 3.11 and 3.12, along with the Docker build, secret scan and commit policy check.

Fixes #112.

@aleksUIX
aleksUIX marked this pull request as ready for review October 6, 2026 04:57

This branch has not been deployed

No deployments
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.

GET /api/v1/deals/{deal_id} returns empty product, pricing and terms for a deal created through POST /api/v1/deals/from-template

1 participant