From 9d1e5f65413284b27e85f125897d19f926840214 Mon Sep 17 00:00:00 2001 From: Alexey Terentyev Date: Fri, 22 Jun 2018 21:41:14 +0300 Subject: [PATCH] fmt Signed-off-by: Alexey Terentyev --- models/migrations/v68.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/models/migrations/v68.go b/models/migrations/v68.go index 560d25162..4e0b53e05 100644 --- a/models/migrations/v68.go +++ b/models/migrations/v68.go @@ -58,7 +58,7 @@ func reformatAndRemoveIncorrectTopics(x *xorm.Engine) (err error) { } if models.ValidateTopic(topic.Name) { - unifiedTopic := Topic{Name:topic.Name} + unifiedTopic := Topic{Name: topic.Name} exists, err := sess.Get(&unifiedTopic) log.Info("Exists topic with the name %q? %v, id = %v", topic.Name, exists, unifiedTopic.ID) if err != nil { @@ -66,10 +66,10 @@ func reformatAndRemoveIncorrectTopics(x *xorm.Engine) (err error) { } if exists { log.Info("Updating repo_topic rows with topic_id = %v to topic_id = %v", topic.ID, unifiedTopic.ID) - if _, err := sess.Where("topic_id = ? AND repo_id NOT IN " + - "(SELECT rt1.repo_id FROM repo_topic rt1 INNER JOIN repo_topic rt2 " + + if _, err := sess.Where("topic_id = ? AND repo_id NOT IN "+ + "(SELECT rt1.repo_id FROM repo_topic rt1 INNER JOIN repo_topic rt2 "+ "ON rt1.repo_id = rt2.repo_id WHERE rt1.topic_id = ? AND rt2.topic_id = ?)", - topic.ID, topic.ID, unifiedTopic.ID).Update(&models.RepoTopic{TopicID:unifiedTopic.ID}); err != nil { + topic.ID, topic.ID, unifiedTopic.ID).Update(&models.RepoTopic{TopicID: unifiedTopic.ID}); err != nil { return err } log.Info("Updating topic `repo_count` field")