mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 16:40:52 +00:00
Batch fix
This commit is contained in:
parent
53a17bbd24
commit
369ddf76a8
14 changed files with 75 additions and 14 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue