Skip to content

Commit

Permalink
Hide gates
Browse files Browse the repository at this point in the history
  • Loading branch information
folix-01 committed Oct 31, 2023
1 parent f748cd7 commit 142bb8d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions src/redturtle/prenotazioni/content/booking_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ class IBookingType(model.Schema):
),
)

gates = schema.List(
title=_("gates_label", default="Gates"),
description=_("gates_help", default="Put gates here (one per line)."),
required=True,
value_type=schema.Choice(
vocabulary="redturtle.prenotazioni.VocBookingTypeGates"
),
default=[],
)
# gates = schema.List(
# title=_("gates_label", default="Gates"),
# description=_("gates_help", default="Put gates here (one per line)."),
# required=True,
# value_type=schema.Choice(
# vocabulary="redturtle.prenotazioni.VocBookingTypeGates"
# ),
# default=[],
# )


@implementer(IBookingType)
Expand Down
2 changes: 1 addition & 1 deletion src/redturtle/prenotazioni/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def to_2000(context):
duration=type.get("duration"),
hidden=type.get("hidden"),
container=obj,
gates=["all"],
# gates=["all"],
)

if not type.get("hidden", False):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class VocDurataIncontro(object):
""" """

def __call__(self, context):
items = [VocabItem(str(x), str(x)) for x in range(10, 95, 5)]
items = [VocabItem(x, x) for x in range(10, 95, 5)]

if not IDexterityContent.providedBy(context):
req = getRequest()
Expand All @@ -29,7 +29,7 @@ def __call__(self, context):
terms = []
for item in items:
terms.append(
SimpleTerm(value=item.token, token=str(item.token), title=item.value)
SimpleTerm(value=item.token, token=item.token, title=item.value)
)
return SimpleVocabulary(terms)

Expand Down

0 comments on commit 142bb8d

Please sign in to comment.