Skip to content

Commit

Permalink
fix: return model_id instead of error if model is already downloaded (#…
Browse files Browse the repository at this point in the history
…1524)

* fix: print message if model is already downloaded

* fix: format

---------

Co-authored-by: vansangpfiev <[email protected]>
  • Loading branch information
vansangpfiev and sangjanai authored Oct 21, 2024
1 parent ed7bcef commit fcee871
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/services/model_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ cpp::result<std::string, std::string> ModelService::HandleUrl(

if (model_entry.has_value()) {
CLI_LOG("Model already downloaded: " << unique_model_id);
return cpp::fail("Please delete the model before downloading again");
return unique_model_id;
}

auto local_path{file_manager_utils::GetModelsContainerPath() /
Expand Down

0 comments on commit fcee871

Please sign in to comment.