Skip to content

Commit

Permalink
Set correct default for empty link
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Oct 27, 2024
1 parent 5228814 commit 3da1fd8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions djangocms_link/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ class LinkFormField(Field):

def __init__(self, *args, **kwargs):
kwargs.setdefault("help_text", _("Select a link type and provide a link."))
kwargs.setdefault("initial", {})
kwargs.pop("encoder", None) # Passed from LinkField's JSONField parent class
kwargs.pop("decoder", None) # but not needed
super().__init__(*args, **kwargs)
Expand Down

0 comments on commit 3da1fd8

Please sign in to comment.