Skip to content

Commit

Permalink
Remove unused blank parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Oct 26, 2024
1 parent e8aa4dc commit 26eb9ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion djangocms_link/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class AbstractLink(CMSPlugin):

link = LinkField(
verbose_name=_('Link'),
blank=False,
)
# advanced options
target = models.CharField(
Expand Down Expand Up @@ -120,6 +119,10 @@ def clean(self):
code='required',
)

def __init__(self, *args, **wkargs):
super().__init__(*args, **wkargs)
self._meta.get_field('link').blank = self.link_is_optional


class Link(AbstractLink):
class Meta:
Expand Down

0 comments on commit 26eb9ff

Please sign in to comment.