Batch fix

This commit is contained in:
Unknown 2014-03-21 01:09:22 -04:00
parent 53a17bbd24
commit 369ddf76a8
14 changed files with 75 additions and 14 deletions

View file

@ -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,