We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63e6a29 commit a1a7ce2Copy full SHA for a1a7ce2
1 file changed
engine/database/models.cc
@@ -262,6 +262,11 @@ cpp::result<bool, std::string> Models::UpdateModelAlias(
262
cpp::result<bool, std::string> Models::DeleteModelEntry(
263
const std::string& identifier) {
264
try {
265
+ // delete only if its there
266
+ if (!HasModel(identifier)) {
267
+ return true;
268
+ }
269
+
270
SQLite::Statement del(
271
db_, "DELETE from models WHERE model_id = ? OR model_alias = ?");
272
del.bind(1, identifier);
0 commit comments