Skip to content

Commit 252ea44

Browse files
authored
Instanciate Transition.conditions with an empty Iterable instead of None (#117)
1 parent 1887132 commit 252ea44

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Unreleased
55
~~~~~~~~~~
66

77

8+
django-fsm-2 4.2.2 2026-03-14
9+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10+
11+
- Instantiate ``Transition.conditions`` with an empty ``Iterable`` instead of ``None``
12+
813
django-fsm-2 4.2.1 2026-03-09
914
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1015

django_fsm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def __init__(
107107
self.source = source
108108
self.target = target
109109
self.on_error = on_error
110-
self.conditions = conditions
110+
self.conditions = conditions or []
111111
self.permission = permission
112112
self.custom = custom or {}
113113

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "django-fsm-2"
3-
version = "4.2.1"
3+
version = "4.2.2"
44
description = "Django friendly finite state machine support."
55
authors = [{ name = "Mikhail Podgurskiy", email = "kmmbvnr@gmail.com" }]
66
requires-python = ">=3.10"

0 commit comments

Comments
 (0)