File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/dstack/_internal/cli/commands Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -141,14 +141,14 @@ def _delete(self, args: argparse.Namespace):
141141 def _get (self , args : argparse .Namespace ):
142142 # TODO: Implement non-json output format
143143 fleet_id = None
144- if args .id :
144+ if args .id is not None :
145145 try :
146146 fleet_id = UUID (args .id )
147147 except ValueError :
148148 raise CLIError (f"Invalid UUID format: { args .id } " )
149149
150150 try :
151- if args .id :
151+ if args .id is not None :
152152 fleet = self .api .client .fleets .get (
153153 project_name = self .api .project , fleet_id = fleet_id
154154 )
Original file line number Diff line number Diff line change @@ -51,14 +51,14 @@ def _command(self, args: argparse.Namespace):
5151 def _get (self , args : argparse .Namespace ):
5252 # TODO: Implement non-json output format
5353 run_id = None
54- if args .id :
54+ if args .id is not None :
5555 try :
5656 run_id = UUID (args .id )
5757 except ValueError :
5858 raise CLIError (f"Invalid UUID format: { args .id } " )
5959
6060 try :
61- if args .id :
61+ if args .id is not None :
6262 run = self .api .client .runs .get (project_name = self .api .project , run_id = run_id )
6363 else :
6464 run = self .api .client .runs .get (project_name = self .api .project , run_name = args .name )
You can’t perform that action at this time.
0 commit comments