bugfix in processing the user entered keywords for custom component share command (#3012)
This commit is contained in:
parent
8c99a4a7f5
commit
43dff5397c
@ -715,7 +715,7 @@ def publish(
|
|||||||
_collect_details_for_gallery()
|
_collect_details_for_gallery()
|
||||||
|
|
||||||
|
|
||||||
def _process_entered_list(input: str) -> list | None:
|
def _process_entered_list(input: str | None) -> list | None:
|
||||||
"""Process the user entered comma separated list into a list if applicable.
|
"""Process the user entered comma separated list into a list if applicable.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -724,7 +724,7 @@ def _process_entered_list(input: str) -> list | None:
|
|||||||
Returns:
|
Returns:
|
||||||
The list of items or None.
|
The list of items or None.
|
||||||
"""
|
"""
|
||||||
return [t.strip() for t in input.split(",") if t if input] or None
|
return [t.strip() for t in (input or "").split(",") if t if input] or None
|
||||||
|
|
||||||
|
|
||||||
def _validate_project_info():
|
def _validate_project_info():
|
||||||
@ -773,6 +773,7 @@ def _validate_project_info():
|
|||||||
)
|
)
|
||||||
or []
|
or []
|
||||||
)
|
)
|
||||||
|
project["keywords"] = new_keywords
|
||||||
elif keyword_action == "a":
|
elif keyword_action == "a":
|
||||||
new_keywords = (
|
new_keywords = (
|
||||||
_process_entered_list(
|
_process_entered_list(
|
||||||
@ -780,7 +781,7 @@ def _validate_project_info():
|
|||||||
)
|
)
|
||||||
or []
|
or []
|
||||||
)
|
)
|
||||||
project["keywords"] = project.get("keywords", []) + new_keywords
|
project["keywords"] = project.get("keywords", []) + new_keywords
|
||||||
|
|
||||||
if not project.get("urls"):
|
if not project.get("urls"):
|
||||||
project["urls"] = {}
|
project["urls"] = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user