mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 11:54:46 +00:00
Fix reggression, save not activated repos to database on sync again (#510)
* Fix #508 * Add testcase Unrelated nits: * Rm one index (unique will already create an index) * Do not drop on UpdateUser
This commit is contained in:
@@ -93,7 +93,10 @@ func GetRepos(c *gin.Context) {
|
||||
if flush || time.Unix(user.Synced, 0).Add(time.Hour*72).Before(time.Now()) {
|
||||
log.Debug().Msgf("sync begin: %s", user.Login)
|
||||
user.Synced = time.Now().Unix()
|
||||
store_.UpdateUser(user)
|
||||
if err := store_.UpdateUser(user); err != nil {
|
||||
log.Err(err).Msgf("update user '%s'", user.Login)
|
||||
return
|
||||
}
|
||||
|
||||
config := ToConfig(c)
|
||||
|
||||
|
Reference in New Issue
Block a user