mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
DEV: Enable unless
cops
We discussed the use of `unless` internally and decided to enforce available rules from rubocop to restrict its most problematic uses.
This commit is contained in:

committed by
Loïc Guitaut

parent
87de3c2319
commit
f7c57fbc19
@ -803,12 +803,12 @@ class ImportScripts::Lithium < ImportScripts::Base
|
||||
import_mode: true,
|
||||
}
|
||||
|
||||
unless topic_id
|
||||
if topic_id
|
||||
msg[:topic_id] = topic_id
|
||||
else
|
||||
msg[:title] = @htmlentities.decode(topic["subject"]).strip[0...255]
|
||||
msg[:archetype] = Archetype.private_message
|
||||
msg[:target_usernames] = usernames.join(",")
|
||||
else
|
||||
msg[:topic_id] = topic_id
|
||||
end
|
||||
|
||||
msg
|
||||
|
Reference in New Issue
Block a user