Skip to content

Commit

Permalink
Merge branch 'main' into doc-skeleton-escape-sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
phorward authored Jan 21, 2025
2 parents f30e43a + 443c1c0 commit 07ff8d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/viur/core/bones/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1447,14 +1447,14 @@ def structure(self) -> dict:
ret = {
"descr": self.descr,
"type": self.type,
"required": self.required,
"required": self.required and not self.readOnly,
"params": self.params,
"visible": self.visible,
"readonly": self.readOnly,
"unique": self.unique.method.value if self.unique else False,
"languages": self.languages,
"emptyvalue": self.getEmptyValue(),
"indexed": self.indexed
"indexed": self.indexed,
}

# Provide a defaultvalue, if it's not a function.
Expand All @@ -1470,6 +1470,8 @@ def structure(self) -> dict:
}
else:
ret["multiple"] = self.multiple

# Provide compute information
if self.compute:
ret["compute"] = {
"method": self.compute.interval.method.name
Expand Down
2 changes: 1 addition & 1 deletion src/viur/core/prototypes/skelmodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __load_indexes_from_file() -> dict[str, list]:
with open(os.path.join(conf.instance.project_base_path, "index.yaml"), "r") as file:
indexes = yaml.safe_load(file)
indexes = indexes.get("indexes", [])
for index in indexes:
for index in indexes or ():
index["properties"] = [_property["name"] for _property in index["properties"]]
indexes_dict.setdefault(index["kind"], []).append(index)

Expand Down

0 comments on commit 07ff8d3

Please sign in to comment.