Skip to content

Conversation

@cofin
Copy link
Member

@cofin cofin commented Feb 6, 2026

Summary

  • Make model parameter positional-only (/) in model_from_dict() to prevent TypeError when the data dict contains a "model" key
  • Update all call sites in service layer to use positional form

Closes #668

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.17%. Comparing base (e306121) to head (f48ebea).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #673   +/-   ##
=======================================
  Coverage   81.17%   81.17%           
=======================================
  Files          99       99           
  Lines        7990     7990           
  Branches     1079     1079           
=======================================
  Hits         6486     6486           
  Misses       1180     1180           
  Partials      324      324           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Prevents TypeError when data dict contains a "model" key.

Closes litestar-org#668
@cofin cofin force-pushed the fix/668-model-from-dict branch from f48ebea to bf4f675 Compare February 7, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: model_from_dict fails if dict has key called 'model'

2 participants