feat: fix organizationChangeTrigger() and userChangeTrigger() bugs

This commit is contained in:
Yang Luo
2024-02-21 01:14:32 +08:00
parent 69a8346d05
commit 03f005389f
2 changed files with 7 additions and 1 deletions

View File

@ -464,7 +464,9 @@ func organizationChangeTrigger(oldName string, newName string) error {
record.Organization = newName
_, err = session.Where("organization=?", oldName).Update(record)
if err != nil {
return err
if err.Error() != "no columns found to be updated" {
return err
}
}
resource := new(Resource)