mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 08:48:37 +00:00
Batch fix
This commit is contained in:
@@ -64,6 +64,10 @@ func CommitRepoAction(userId int64, userName string,
|
||||
watches = append(watches, Watch{UserId: userId})
|
||||
|
||||
for i := range watches {
|
||||
if userId == watches[i].UserId && i > 0 {
|
||||
continue // Do not add twice in case author watches his/her repository.
|
||||
}
|
||||
|
||||
_, err = orm.InsertOne(&Action{
|
||||
UserId: watches[i].UserId,
|
||||
ActUserId: userId,
|
||||
|
Reference in New Issue
Block a user