🐛 fix(types.py): change default value of "error" field in component_template to None for better consistency and readability
🐛 fix(base.py): change default value of "error" field in FrontendNode class to None for better consistency and readability
This commit is contained in:
parent
f82a97b010
commit
2f0ce5fc1b
2 changed files with 2 additions and 2 deletions
|
|
@ -359,7 +359,7 @@ def build_invalid_menu(invalid_components):
|
|||
.get(type(CustomComponent()).__name__)
|
||||
)
|
||||
|
||||
component_template["error"] = component.get("error", "")
|
||||
component_template["error"] = component.get("error", None)
|
||||
component_template.get("template").get("code")["value"] = component_code
|
||||
|
||||
invalid_menu[menu_name][component_name] = component_template
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class FrontendNode(BaseModel):
|
|||
output_types: List[str] = []
|
||||
field_formatters: FieldFormatters = Field(default_factory=FieldFormatters)
|
||||
beta: bool = False
|
||||
error: str = ""
|
||||
error: Optional[str] = None
|
||||
|
||||
# field formatters is an instance attribute but it is not used in the class
|
||||
# so we need to create a method to get it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue