Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read options from a manifest file in importcontent #9467

Merged
Prev Previous commit
Next Next commit
Handle empty node_ids in importcontent
If node_ids is set to an empty string, read it as an empty list,
instead of a list with a single empty string.
  • Loading branch information
dylanmccall committed Aug 15, 2022
commit 34f0b2e76e611517f9f735285b96408272bad13d
4 changes: 2 additions & 2 deletions kolibri/core/content/management/commands/importcontent.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def add_arguments(self, parser):
"--node_ids",
"-n",
# Split the comma separated string we get, into a list of strings
type=lambda x: x.split(","),
type=lambda x: x.split(",") if x else [],
default=None,
required=False,
dest="node_ids",
Expand All @@ -109,7 +109,7 @@ def add_arguments(self, parser):
parser.add_argument(
"--exclude_node_ids",
# Split the comma separated string we get, into a list of string
type=lambda x: x.split(","),
type=lambda x: x.split(",") if x else [],
default=None,
required=False,
dest="exclude_node_ids",
Expand Down