summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 40a8e7f07c6..65f81727071 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -222,7 +222,7 @@ class Project < ActiveRecord::Base
has_many :uploads, as: :model, dependent: :destroy
# Scopes
- scope :with_deleted, -> { where(pending_delete: true) }
+ scope :pending_delete, -> { where(pending_delete: true) }
scope :without_deleted, -> { where(pending_delete: false) }
scope :sorted_by_activity, -> { reorder(last_activity_at: :desc) }
@@ -376,7 +376,6 @@ class Project < ActiveRecord::Base
.or(ptable[:description].matches(pattern))
)
-
namespaces = unscoped.select(:id)
.joins(:namespace)
.where(ntable[:name].matches(pattern))
@@ -1456,7 +1455,7 @@ class Project < ActiveRecord::Base
def pending_delete_twin
return false unless path
- Project.with_deleted.find_by_full_path(path_with_namespace)
+ Project.pending_delete.find_by_full_path(path_with_namespace)
end
##