try fix again again.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-07-26 20:56:46 +02:00
parent bd27b14a88
commit 6b1f34db79
2 changed files with 11 additions and 10 deletions
+6 -6
View File
@@ -486,17 +486,17 @@ func (s *LogService) EditPost(ctx context.Context, id string, update models.Post
ctx = s.authService.SpinOffContext(ctx)
go func() {
l, err := s.logs.Find(context.Background(), post.LogID)
ctx, cancel := context.WithTimeout(ctx, time.Minute*10)
defer cancel()
l, err := s.logs.Find(ctx, post.LogID)
if err != nil {
return
}
timeout, cancel := context.WithTimeout(context.Background(), time.Minute*10)
defer cancel()
s.changeService.Submit(ctx, models.ChangeModelPost, "edit", true, changekeys.Many(l, post), post)
s.changeService.Submit(timeout, models.ChangeModelPost, "edit", true, changekeys.Many(l, post), post)
_, err = s.refreshLogCharacters(timeout, *l, nil, false)
_, err = s.refreshLogCharacters(ctx, *l, nil, false)
if err != nil {
log.Printf("Failed to update characters in log %s: %s", l.ID, err)
}