Skip to content

Commit 1feb1c6

Browse files
committed
Limit experience-cs rake task to scratch projects
This changes the check for project existence to only consider projects of type `Project::Types::SCRATCH`. Note that the `Project.only_scratch` scope includes the call to `Project.unscoped`, so the only change is to add `project_type: 'scratch'` to the query.
1 parent 43921e6 commit 1feb1c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tasks/projects.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace :projects do
5454
]
5555
projects.each do |attributes|
5656
identifier = attributes[:identifier]
57-
if Project.unscoped.exists?(attributes.slice(:identifier, :locale))
57+
if Project.only_scratch(true).exists?(attributes.slice(:identifier, :locale))
5858
puts "Scratch project with identifier '#{identifier}' already exists"
5959
elsif Project.create(attributes)
6060
puts "Scratch project with identifier '#{identifier}' created successfully"

0 commit comments

Comments
 (0)