From 06bde77f512108e6ece0e5a2fe3cc5fe2c0f0559 Mon Sep 17 00:00:00 2001 From: Alen Masic Date: Sat, 17 Nov 2018 10:39:34 +0100 Subject: [PATCH] fixed the issue when Author didn't update --- db.go | 2 +- shell.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db.go b/db.go index 071587c..e960a98 100644 --- a/db.go +++ b/db.go @@ -447,7 +447,7 @@ func (e *Event) Log(db *gorm.DB) { } func (e *Event) SetAuthor(user *User) *Event { - e.Author = user + //e.Author = user e.AuthorID = user.ID return e } diff --git a/shell.go b/shell.go index 87c202f..e749908 100644 --- a/shell.go +++ b/shell.go @@ -2187,7 +2187,7 @@ GLOBAL OPTIONS: if len(words) == 0 { continue } - NewEvent("shell", words[0]).SetArg("interactive", true).SetArg("args", words[1:]).Log(db) + NewEvent("shell", words[0]).SetAuthor(myself).SetArg("interactive", true).SetArg("args", words[1:]).Log(db) if err := app.Run(append([]string{"config"}, words...)); err != nil { if cliErr, ok := err.(*cli.ExitError); ok { if cliErr.ExitCode() != 0 {