diff --git a/kolibri/core/content/management/commands/importcontent.py b/kolibri/core/content/management/commands/importcontent.py index 25526c9f796..9f89967bcab 100644 --- a/kolibri/core/content/management/commands/importcontent.py +++ b/kolibri/core/content/management/commands/importcontent.py @@ -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", @@ -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",