diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-02-20 22:02:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-20 15:02:39 +0100 |
commit | f3e64f677fd242850beafb1767504722f2dc2703 (patch) | |
tree | ae29712abc6c9874139cec88da4ff98d342f4b58 /models/migrations/v166.go | |
parent | 835f301063ab9f82c20f8ad3d253079377078aaa (diff) | |
download | gitea-f3e64f677fd242850beafb1767504722f2dc2703.tar.gz gitea-f3e64f677fd242850beafb1767504722f2dc2703.zip |
Remove unused commit (#14741)
* Remove unused commit
* a small nit
Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: a1012112796 <1012112796@qq.com>
Diffstat (limited to 'models/migrations/v166.go')
-rw-r--r-- | models/migrations/v166.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/models/migrations/v166.go b/models/migrations/v166.go index 3d6cf4f57f..1b6e68b573 100644 --- a/models/migrations/v166.go +++ b/models/migrations/v166.go @@ -106,10 +106,8 @@ func recalculateUserEmptyPWD(x *xorm.Engine) (err error) { } // delete salt and algo where password is empty - if _, err = sess.Where(builder.Eq{"passwd": ""}.And(builder.Neq{"salt": ""}.Or(builder.Neq{"passwd_hash_algo": ""}))). - Cols("salt", "passwd_hash_algo").Update(&User{}); err != nil { - return err - } + _, err = sess.Where(builder.Eq{"passwd": ""}.And(builder.Neq{"salt": ""}.Or(builder.Neq{"passwd_hash_algo": ""}))). + Cols("salt", "passwd_hash_algo").Update(&User{}) - return sess.Commit() + return err } |