{"record":{"id":"f321234c0db87bcf","repo":"langflow-ai/langflow","slug":"flow-version-ids-cannot-be-present-in-both-add-rem","errorCode":null,"errorMessage":"Flow version ids cannot be present in both add/remove operations: {ids}.","messagePattern":"Flow version ids cannot be present in both add/remove operations: (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":422,"severity":"error","filePath":"src/backend/base/langflow/api/v1/mappers/deployments/contracts.py","lineNumber":84,"sourceCode":"\nclass FlowVersionPatch(BaseModel):\n    \"\"\"Normalized add/remove patch used by attachment reconciliation.\"\"\"\n\n    add_flow_version_ids: list[UUID] = Field(default_factory=list)\n    remove_flow_version_ids: list[UUID] = Field(default_factory=list)\n\n    @field_validator(\"add_flow_version_ids\", \"remove_flow_version_ids\")\n    @classmethod\n    def _dedupe_ids(cls, values: list[UUID]) -> list[UUID]:\n        return list(dict.fromkeys(values))\n\n    @model_validator(mode=\"after\")\n    def _validate_no_overlap(self) -> FlowVersionPatch:\n        overlap = set(self.add_flow_version_ids).intersection(self.remove_flow_version_ids)\n        if overlap:\n            ids = \", \".join(sorted(str(value) for value in overlap))\n            msg = f\"Flow version ids cannot be present in both add/remove operations: {ids}.\"\n            raise ValueError(msg)\n        return self\n","sourceCodeStart":66,"sourceCodeEnd":86,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/mappers/deployments/contracts.py#L66-L86","documentation":"Error \"Flow version ids cannot be present in both add/remove operations: {ids}.\" thrown in langflow-ai/langflow.","triggerScenarios":"Occurs when the same flow version id appears in both the add and remove lists of a deployment update operation.","commonSituations":"See trigger scenarios.","solutions":["Remove the duplicated flow version ids from either the add or the remove list; an id cannot appear in both."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}