Skip to content

Conversation

@pfouque
Copy link
Member

@pfouque pfouque commented Nov 6, 2025

As discussed in #61, FSMModelMixin is misleading: FSM-protected fields are just excluded from refresh_from_db, but in a concurrent context, having the ability to refresh the state fields looks crucial!

This PR updates the behavior to disable "protected" during refresh_from_db.
The fields are still protected from direct modification but refresh_from_db acts normally.

I'll let this PR open for a certain amount of time to gather some feedback. If you're using this feature feel free to give it a try (as I'm not using "protected" anymore, just editable=False)

@pfouque pfouque added bug Something isn't working enhancement New feature or request labels Nov 6, 2025
@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
django_fsm/__init__.py 94.85% <100.00%> (-0.31%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants