Skip to content

Commit 2f4b647

Browse files
committed
Use '' as default snapshot_from value
1 parent e0d4ed5 commit 2f4b647

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

node_cli/cli/mirage_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ def restore_node(backup_path, env_file, config_only):
111111
@click.option(
112112
'--snapshot-from',
113113
type=URL_TYPE,
114-
default=None,
114+
default='',
115115
hidden=True,
116116
help=TEXTS['mirage']['node']['repair']['snapshot_from']
117117
)
118-
def repair(snapshot_from: str | None = None) -> None:
118+
def repair(snapshot_from: str = '') -> None:
119119
request_repair(snapshot_from=snapshot_from)

node_cli/mirage/mirage_node.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,12 @@ def restore_mirage(backup_path, env_filepath, config_only=False):
5555

5656

5757
@check_inited
58-
def request_repair(snapshot_from: str | None = None) -> None:
58+
def request_repair(snapshot_from: str = '') -> None:
5959
node_type = NodeType.MIRAGE
6060
env = compose_node_env(SKALE_DIR_ENV_FILEPATH, save=False, node_type=node_type)
6161
params = get_static_params(node_type, env['ENV_TYPE'])
6262
record = ChainRecord(params['info']['chain_name'])
6363
record.set_repair_ts(int(time.time()))
64-
if snapshot_from:
65-
record.set_snapshot_from(snapshot_from)
64+
record.set_snapshot_from(snapshot_from)
6665

6766
print(TEXTS['mirage']['node']['repair']['repair_requested'])

0 commit comments

Comments
 (0)