Skip to content

Commit a1a7ce2

Browse files
committed
update
1 parent 63e6a29 commit a1a7ce2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

engine/database/models.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,11 @@ cpp::result<bool, std::string> Models::UpdateModelAlias(
262262
cpp::result<bool, std::string> Models::DeleteModelEntry(
263263
const std::string& identifier) {
264264
try {
265+
// delete only if its there
266+
if (!HasModel(identifier)) {
267+
return true;
268+
}
269+
265270
SQLite::Statement del(
266271
db_, "DELETE from models WHERE model_id = ? OR model_alias = ?");
267272
del.bind(1, identifier);

0 commit comments

Comments
 (0)