From 34ccc68b3adc4ffd3d133fa0de4de4c69d7df9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=B4=BA?= Date: Tue, 14 Apr 2026 18:44:46 +0800 Subject: [PATCH] fix: clear firewall rule description (#12491) #### What this PR does / why we need it? Refs https://github.com/1Panel-dev/1Panel/issues/12488 #### Summary of your change #### Please indicate you've done the following: - [ ] Made sure tests are passing and test coverage is added if needed. - [ ] Made sure commit message follow the rule of [Conventional Commits specification](https://www.conventionalcommits.org/). - [ ] Considered the docs impact and opened a new docs issue or PR with docs changes if needed. --- agent/app/repo/host.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agent/app/repo/host.go b/agent/app/repo/host.go index a96a71db5..36408cb0e 100644 --- a/agent/app/repo/host.go +++ b/agent/app/repo/host.go @@ -165,6 +165,9 @@ func (h *HostRepo) SaveFirewallRecord(firewall *model.Firewall) error { firewall.Strategy, ).First(&data).Error } + if data.ID != 0 { + firewall.ID = data.ID + } return global.DB.Save(firewall).Error }