create on the master
refs CORE-2598 test plan - specs should pass Change-Id: I58a0019c623d9c80b7e7591e0f8701826d953f49 Reviewed-on: https://gerrit.instructure.com/187859 Tested-by: Jenkins Reviewed-by: Mysti Lilla <mysti@instructure.com> QA-Review: Mysti Lilla <mysti@instructure.com> Product-Review: Mysti Lilla <mysti@instructure.com>
This commit is contained in:
parent
2e5c3e1f44
commit
9cc199fb04
|
@ -176,11 +176,13 @@ class LearningOutcomeGroup < ActiveRecord::Base
|
|||
# do this in a transaction, so parallel calls don't create multiple roots
|
||||
# TODO: clean up contexts that already have multiple root outcome groups
|
||||
transaction do
|
||||
group = scope.active.root.first
|
||||
group = scope.active.root.take
|
||||
if !group && force
|
||||
group = scope.build :title => context.try(:name) || 'ROOT'
|
||||
group.building_default = true
|
||||
group.save!
|
||||
Shackles.activate(:master) do
|
||||
group.save!
|
||||
end
|
||||
end
|
||||
group
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue