Skip to content

Commit 03c6998

Browse files
pfouquekmmbvnr
authored andcommitted
Fix command for django 4
1 parent 929f480 commit 03c6998

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

django_fsm/management/commands/graph_transitions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
from django.core.management.base import BaseCommand
77
try:
88
from django.utils.encoding import force_text
9+
_requires_system_checks = True
910
except ImportError: # Django >= 4.0
1011
from django.utils.encoding import force_str as force_text
12+
from django.core.management.base import ALL_CHECKS
13+
_requires_system_checks = ALL_CHECKS
1114

1215
from django_fsm import FSMFieldMixin, GET_STATE, RETURN_VALUE
1316

@@ -135,7 +138,7 @@ def get_graphviz_layouts():
135138

136139

137140
class Command(BaseCommand):
138-
requires_system_checks = True
141+
requires_system_checks = _requires_system_checks
139142

140143
if not HAS_ARGPARSE:
141144
option_list = BaseCommand.option_list + (

0 commit comments

Comments
 (0)