{"record":{"id":"62953b0098b09340","repo":"makeplane/plane","slug":"workspace-slug-is-required-62953b","errorCode":null,"errorMessage":"Workspace slug is required","messagePattern":"Workspace slug is required","errorType":"exception","errorClass":"CommandError","httpStatus":null,"severity":"error","filePath":"apps/api/plane/db/management/commands/fix_duplicate_sequences.py","lineNumber":31,"sourceCode":"\n\nclass Command(BaseCommand):\n    help = \"Fix duplicate sequences\"\n\n    def add_arguments(self, parser):\n        # Positional argument\n        parser.add_argument(\"issue_identifier\", type=str, help=\"Issue Identifier\")\n\n    def strict_str_to_int(self, s):\n        if not s.isdigit() and not (s.startswith(\"-\") and s[1:].isdigit()):\n            raise ValueError(\"Invalid integer string\")\n        return int(s)\n\n    def handle(self, *args, **options):\n        workspace_slug = input(\"Workspace slug: \")\n\n        if not workspace_slug:\n            raise CommandError(\"Workspace slug is required\")\n\n        issue_identifier = options.get(\"issue_identifier\", False)\n\n        # Validate issue_identifier\n        if not issue_identifier:\n            raise CommandError(\"Issue identifier is required\")\n\n        # Validate issue identifier\n        try:\n            identifier = issue_identifier.split(\"-\")\n\n            if len(identifier) != 2:\n                raise ValueError(\"Invalid issue identifier format\")\n\n            project_identifier = identifier[0]\n            issue_sequence = self.strict_str_to_int(identifier[1])\n\n            # Fetch the project","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/makeplane/plane/blob/1c8a60f858d8472aa56e29994ec1c7926da2c6ce/apps/api/plane/db/management/commands/fix_duplicate_sequences.py#L13-L49","documentation":"Raised by `fix_duplicate_sequences` when the `input(\"Workspace slug: \")` prompt returns an empty string (lines 28-31). This raise happens BEFORE the try block (try starts at line 40), so it propagates as a true non-zero CommandError.","triggerScenarios":"Running the command and pressing Enter at the 'Workspace slug: ' prompt without typing anything.","commonSituations":"Accidental empty Enter; scripting the command without piping a slug to stdin.","solutions":["Type the workspace slug at the prompt.","Pipe the slug via stdin: `echo 'my-workspace' | python manage.py fix_duplicate_sequences PLANE-42`.","Confirm the slug exists: `Workspace.objects.filter(slug=...).exists()`."],"exampleFix":"# before\n$ python manage.py fix_duplicate_sequences PLANE-42\nWorkspace slug: <Enter>          # empty\n# after\n$ echo my-workspace | python manage.py fix_duplicate_sequences PLANE-42","handlingStrategy":"validation","validationCode":"# Provide the slug non-interactively by piping stdin:\n# echo 'my-workspace' | python manage.py fix_duplicate_sequences PLANE-42\nslug = 'my-workspace'\nassert slug and slug.strip(), 'workspace slug required'","typeGuard":"def is_non_empty_slug(value: str) -> bool:\n    return isinstance(value, str) and bool(value.strip())","tryCatchPattern":"try:\n    call_command('fix_duplicate_sequences', 'PLANE-42', stdin=StringIO('my-workspace\\n'))\nexcept CommandError as e:\n    if 'Workspace slug is required' in str(e):\n        ...","preventionTips":["Pipe the slug via stdin when scripting the command.","Never submit an empty Enter at the prompt.","Pre-check the slug exists."],"tags":["django","management-command","validation","input-validation","plane","interactive"],"backgroundTag":null,"analyzedSha":"1c8a60f858d8472aa56e29994ec1c7926da2c6ce","analyzedAt":"2026-08-12T14:44:31.636Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}