fix: copy_ufo_sanjiaozhou_catalog 的 --list-clubs 可不传 --to-club

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-24 00:57:33 +08:00
parent e8e98e2970
commit 2a2ed25f0c

View File

@@ -53,8 +53,8 @@ class Command(BaseCommand):
parser.add_argument(
'--to-club',
type=str,
required=True,
help='目标俱乐部 club_id必须显式指定如 lxs 或 lsx',
default='',
help='目标俱乐部 club_id必须显式指定如 lxs--list-clubs 时可省略',
)
parser.add_argument(
'--leixing-name',
@@ -101,7 +101,10 @@ class Command(BaseCommand):
confirm = (options.get('i_confirm_to_club') or '').strip()
if not to_club:
raise CommandError('必须传 --to-club=...')
raise CommandError(
'必须传 --to-club=...(龙先生当前库为 lxs'
'仅查看俱乐部列表时用python manage.py copy_ufo_sanjiaozhou_catalog --list-clubs'
)
self.stdout.write(self.style.NOTICE('—— Club 表候选(名称含「龙先生」)——'))
self._list_clubs(Club, only_hint=True)