diff --git a/management/server/store/sql_store.go b/management/server/store/sql_store.go index 44260c4b6..9caa5d209 100644 --- a/management/server/store/sql_store.go +++ b/management/server/store/sql_store.go @@ -886,6 +886,10 @@ func (s *SqlStore) GetAccountSettings(ctx context.Context, lockStrength LockingS // SaveUserLastLogin stores the last login time for a user in DB. func (s *SqlStore) SaveUserLastLogin(ctx context.Context, accountID, userID string, lastLogin time.Time) error { + if lastLogin.IsZero() { + return nil + } + var user types.User result := s.db.First(&user, accountAndIDQueryCondition, accountID, userID) if result.Error != nil {