fix: remove redundant validation in delete mode
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -18,19 +18,8 @@ pub fn mode_delete(
|
||||
conn: &mut Connection,
|
||||
data_path: PathBuf,
|
||||
) -> Result<()> {
|
||||
if ids.is_empty() {
|
||||
cmd.error(
|
||||
ErrorKind::InvalidValue,
|
||||
"No ID given, you must supply atleast one ID when using --delete",
|
||||
)
|
||||
.exit();
|
||||
} else if !tags.is_empty() {
|
||||
cmd.error(
|
||||
ErrorKind::InvalidValue,
|
||||
"Tags given but not supported, you must supply atleast one ID when using --delete",
|
||||
)
|
||||
.exit();
|
||||
}
|
||||
// Validation is now handled at the argument parsing level
|
||||
// So we can assume ids is not empty and tags is empty
|
||||
|
||||
let item_service = ItemService::new(data_path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user