fix sonar problem

* Delete FIXME comment, because `string == ""` is beter than `len(string)` for checking string existence(by sonar)
* Remove duplicated code
* Fill empty block of code
This commit is contained in:
t29kida
2021-06-08 23:06:19 +09:00
parent 18de06b970
commit 4eb19f938a
4 changed files with 5 additions and 34 deletions

View File

@@ -2760,6 +2760,7 @@ func TestStrPkInsert(t *testing.T) {
if err != nil {
fmt.Println(err)
if err.Error() == "postgres version must 9.5 or higher" || err.Error() == "`sqlite3` nonsupport InsertOrUpdate in beego" {
return
} else if err == ErrLastInsertIdUnavailable {
return
} else {