Skip to content

Commit

Permalink
add check to bypass validation
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Sep 10, 2024
1 parent 118c59a commit 341a7b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/iosanita/contenttypes/adapters/schema_tweaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from zope.interface import implementer
from zope.interface import Interface

import os


@implementer(ISchemaPlugin)
@adapter(IFormFieldProvider)
Expand All @@ -25,6 +27,8 @@ def __call__(self):

def set_description_required(self):
"""fix Documento fields"""
if os.environ["DISABLE_DESCRIPTION_VALIDATION"]:
return
if self.schema.getName() == "IBasic":
self.schema["description"].required = True

Expand Down

0 comments on commit 341a7b9

Please sign in to comment.