models/protect_branch: fix whitelist with invalid 'protect_branch_id' (#4333)

If user creates a protect branch for the first time (which has ID=0),
it generates invalid whitelist records with 'protect_branch_id=0'.
This prevents future updates of protect branch whitelist.

Migration: remove existing invalid protect branch whitelist records.
This commit is contained in:
Unknwon
2017-03-27 13:13:04 -04:00
parent 73de9f9d6a
commit 1038916460
6 changed files with 26 additions and 9 deletions

View File

@@ -16,7 +16,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
const APP_VER = "0.10.30.0325"
const APP_VER = "0.10.31.0327"
func init() {
setting.AppVer = APP_VER