Skip to content

Commit 2192a3c

Browse files
committed
Only build scratch component for project if present
1 parent ce63d8b commit 2192a3c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/concepts/project/operations/create.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def build_project(project_hash, current_user)
2020
project_hash[:identifier] = PhraseIdentifier.generate unless current_user&.experience_cs_admin?
2121
new_project = Project.new(project_hash.except(:components, :scratch_component))
2222
new_project.components.build(project_hash[:components])
23-
new_project.build_scratch_component(project_hash[:scratch_component])
23+
new_project.build_scratch_component(project_hash[:scratch_component]) if project_hash[:scratch_component].present?
2424
new_project
2525
end
2626
end

0 commit comments

Comments
 (0)