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
@ -887,7 +887,7 @@ class ImportScripts::DiscuzX < ImportScripts::Base
|
||||
LIMIT 1",
|
||||
)
|
||||
|
||||
return discuzx_link unless results.size > 0
|
||||
return discuzx_link if results.size.zero?
|
||||
|
||||
linked_post_id = results.first["pid"]
|
||||
lookup = topic_lookup_from_imported_post_id(linked_post_id)
|
||||
|
Reference in New Issue
Block a user