File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 22Changelog
33=========
44
5+ 0.3.2 (2025-03-04)
6+ ==================
7+
8+ * fix: Action tab failed form validation if djangocms-link was installed
9+
5100.3.1 (2025-03-03)
611==================
712
Original file line number Diff line number Diff line change 66 _ = lambda x : x # noqa: E731
77
88
9- __version__ = "0.3.1 "
9+ __version__ = "0.3.2 "
1010
1111_form_registry = {}
1212
Original file line number Diff line number Diff line change @@ -56,6 +56,10 @@ def get_action_class(action):
5656 return _action_registry .get (action , None )
5757
5858
59+ def get_hash (action_class ):
60+ return hashlib .sha1 (action_class .__name__ .encode ("utf-8" )).hexdigest ()
61+
62+
5963class ActionMixin :
6064 """Adds action form elements to Form plugin admin"""
6165
@@ -283,6 +287,11 @@ class Meta:
283287 required = True ,
284288 )
285289
290+ def __init__ (self , * args , ** kwargs ):
291+ super ().__init__ (* args , ** kwargs )
292+ if args :
293+ self .fields ["redirect_link" ].required = get_hash (RedirectAction ) in args [0 ].get ("form_actions" , [])
294+
286295 def execute (self , form , request ):
287296 form .Meta .options ["redirect" ] = get_link (
288297 self .get_parameter (form , "redirect_link" )
You can’t perform that action at this time.
0 commit comments