From 58c9ba14c2e9f0a04a25cecbe19398b78ee96d43 Mon Sep 17 00:00:00 2001 From: Alex Ioannidis Date: Fri, 15 Nov 2024 10:38:32 +0100 Subject: [PATCH] moderation: fix CLI usage for importing link domains --- site/zenodo_rdm/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site/zenodo_rdm/cli.py b/site/zenodo_rdm/cli.py index 1d27e71f..7283c067 100644 --- a/site/zenodo_rdm/cli.py +++ b/site/zenodo_rdm/cli.py @@ -377,7 +377,7 @@ def domains_cli(): @domains_cli.command("add") -@click.option("-d", "--domain", required=True, help="The domain to add.") +@click.option("-d", "--domain", help="The domain to add.") @click.option("-n", "--notes", help="Additional notes for the domain.") @click.option( "-s", @@ -396,6 +396,7 @@ def domains_cli(): @with_appcontext def add_domain(domain, notes, status, score, file): """Command to add a moderated links domain.""" + assert domain or file, "You must provide either a single domain or a CSV file." if file: _add_domains_from_csv(file) else: