Skip to content

Commit d4f6d24

Browse files
committed
fix invertible unless condition
1 parent 95924e4 commit d4f6d24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module ::CommunityCustomFields
4545

4646
on(:topic_created) do |topic, _opts, user|
4747
next unless topic.archetype == "regular"
48-
next unless user.id > 0
48+
next if user.id <= 0
4949

5050
topic.custom_fields[:status] = "new"
5151

@@ -59,7 +59,7 @@ module ::CommunityCustomFields
5959

6060
on(:post_created) do |post, _opts, user|
6161
next unless post.archetype == "regular"
62-
next unless user.id > 0
62+
next if user.id <= 0
6363
next unless post.post_type == 1 || post.post_type == 4
6464
next if post.post_number == 1
6565

0 commit comments

Comments
 (0)