From f8a62b435dbe4fcaa7cbe2b80fe4083c5d48268a Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 30 Dec 2024 10:42:30 +0800 Subject: [PATCH] * [misc] adjust instance uninstall logic. --- module/instance/model.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module/instance/model.php b/module/instance/model.php index 1edb0ee8b2..fd66f1196e 100644 --- a/module/instance/model.php +++ b/module/instance/model.php @@ -792,10 +792,9 @@ class instanceModel extends model $result = $this->cne->uninstallApp($apiParams); $success = $result->code == 200 || $result->code == 404; - if($success) $this->dao->update(TABLE_INSTANCE)->set('deleted')->eq(1)->where('id')->eq($instance->id)->exec(); + if($success) $this->dao->delete()->from(TABLE_INSTANCE)->where('id')->eq($instance->id)->exec(); - $url = strstr(getWebRoot(true), ':', true) . '://' . $instance->domain; - $this->dao->delete()->from(TABLE_PIPELINE)->where('url')->eq($url)->exec(); + $this->dao->delete()->from(TABLE_PIPELINE)->where('instanceID')->eq($instance->id)->exec(); return $success; }