Skip to content

Commit

Permalink
RegistryValueVocabulary: filter out empty values.
Browse files Browse the repository at this point in the history
There can easily be an empty row at the end.
  • Loading branch information
mauritsvanrees committed Apr 19, 2024
1 parent 4afab41 commit 15641f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/euphorie/content/vocabularies.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def __len__(self):

@property
def values(self):
return api.portal.get_registry_record(self.value_name, default=[])
return tuple(
filter(None, api.portal.get_registry_record(self.value_name, default=[]))
)

def __call__(self, context):
return safe_simplevocabulary_from_values(self.values)

0 comments on commit 15641f8

Please sign in to comment.