Skip to content

Commit 17ce1a7

Browse files
committed
correct flow default for remove
1 parent a6c7fb4 commit 17ce1a7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cylc/flow/network/resolvers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
DELTA_ADDED, create_delta_store
4747
)
4848
import cylc.flow.flags
49+
from cylc.flow.flow_mgr import FLOW_ALL
4950
from cylc.flow.id import Tokens
5051
from cylc.flow.network.schema import (
5152
DEF_TYPES,
@@ -682,7 +683,10 @@ async def mutator(
682683
# remove at: 8.x
683684
# For back compat, with gql-v3 None will not use default_value.
684685
if 'flow' in kwargs:
685-
kwargs['flow'] = kwargs['flow'] or []
686+
kwargs['flow'] = (
687+
kwargs['flow']
688+
or ([FLOW_ALL] if command == 'remove_tasks' else [])
689+
)
686690
result = await self._mutation_mapper(command, kwargs, meta)
687691
return [{'id': w_id, 'response': result}]
688692

cylc/flow/scripts/remove.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import sys
5555
from typing import TYPE_CHECKING
5656

57+
from cylc.flow.flow_mgr import FLOW_ALL
5758
from cylc.flow.network.client_factory import get_client
5859
from cylc.flow.network.multi import call_multi
5960
from cylc.flow.option_parsers import (
@@ -98,7 +99,7 @@ def get_option_parser() -> COP:
9899
action='append',
99100
dest='flow',
100101
metavar='FLOW',
101-
default=[],
102+
default=[FLOW_ALL],
102103
help=(
103104
"Remove the task(s) from the specified flow. "
104105
"Reuse the option to remove the task(s) from multiple flows. "

0 commit comments

Comments
 (0)