mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Add default for NumFollowing field (fixes #2261)
We set the default value for the non-NULL field NumFollowing of the User model to 0, which stops an error when the ORM tries to sync.
This commit is contained in:
@@ -91,7 +91,7 @@ type User struct {
|
||||
|
||||
// Counters
|
||||
NumFollowers int
|
||||
NumFollowing int `xorm:"NOT NULL"`
|
||||
NumFollowing int `xorm:"NOT NULL DEFAULT 0"`
|
||||
NumStars int
|
||||
NumRepos int
|
||||
|
||||
|
Reference in New Issue
Block a user