Skip to content

Commit 04e3e83

Browse files
committed
fix with_repository scope
1 parent 2320e3c commit 04e3e83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/project.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Project < ApplicationRecord
1111
scope :owner, ->(owner) { where("(repository ->> 'owner') = ?", owner) }
1212
scope :keyword, ->(keyword) { where("keywords @> ARRAY[?]::varchar[]", keyword) }
1313
scope :with_readme, -> { where.not(readme: nil) }
14-
scope :with_repository, -> { where.not(repository: nil) }
14+
scope :with_repository, -> { where.not(repository: {}) }
1515
scope :with_commits, -> { where.not(commits: nil) }
1616
scope :with_keywords, -> { where.not(keywords: []) }
1717
scope :without_keywords, -> { where(keywords: []) }

0 commit comments

Comments
 (0)