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,
|
conn: &mut Connection,
|
||||||
data_path: PathBuf,
|
data_path: PathBuf,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
if ids.is_empty() {
|
// Validation is now handled at the argument parsing level
|
||||||
cmd.error(
|
// So we can assume ids is not empty and tags is empty
|
||||||
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
let item_service = ItemService::new(data_path);
|
let item_service = ItemService::new(data_path);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user