Skip to content

Commit

Permalink
fix vocabulary jinja template
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTango committed Jan 17, 2025
1 parent 9d0e82a commit 32805b4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# from plone import api
from zope.schema.interfaces import IVocabularyFactory
from zope.interface import implementer
{{% if is_static_catalog_vocab %}}
{{% if is_static_catalog_vocab == 'y' %}}
from plone.app.vocabularies.catalog import StaticCatalogVocabulary
{{% else %}}
from {{{package.dottedname}}} import _
Expand All @@ -14,7 +14,7 @@ from zope.schema.vocabulary import SimpleVocabulary
{{% endif %}}


{{% if not is_static_catalog_vocab %}}
{{% if is_static_catalog_vocab != 'y' %}}
class VocabItem(object):
def __init__(self, token, value):
self.token = token
Expand All @@ -28,7 +28,8 @@ class {{{ vocabulary_name_klass }}}(object):
"""

def __call__(self, context):
{{% if is_static_catalog_vocab %}}
{{% if is_static_catalog_vocab == 'y' %}}
{{{ is_static_catalog_vocab }}}
return StaticCatalogVocabulary(
{
# possible portal_types:
Expand Down

0 comments on commit 32805b4

Please sign in to comment.