From 26eb9ff4cd4ce16bf198df8ef6c919be6e7865e1 Mon Sep 17 00:00:00 2001 From: Fabian Braun Date: Sat, 26 Oct 2024 02:18:39 +0200 Subject: [PATCH] Remove unused blank parameter --- djangocms_link/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/djangocms_link/models.py b/djangocms_link/models.py index e49270b7..f6900d33 100644 --- a/djangocms_link/models.py +++ b/djangocms_link/models.py @@ -71,7 +71,6 @@ class AbstractLink(CMSPlugin): link = LinkField( verbose_name=_('Link'), - blank=False, ) # advanced options target = models.CharField( @@ -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: