fix migration
fixing ability to run, not effect of running. if you already successfully ran the migration, you don't need to rerun it. if you haven't successfully run it, now you can. so it's kosher to fix in place. manually tested with full test-plan (i.e. putting migratable data in place) this time. Change-Id: I0db5b800a0a08a3865fd7f926c6fe8e833a88cea test-plan: * create graded discussion * participate in discussion as student * in script/console, delete the corresponding submission * run migration * verify submission was recreated Reviewed-on: https://gerrit.instructure.com/6904 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Jacob Fugal <jacob@instructure.com>
This commit is contained in:
parent
84e766de0d
commit
23ebfa123e
|
@ -62,8 +62,9 @@ class EnsureSubmissionsForDiscussions < ActiveRecord::Migration
|
|||
groups.group_category_id=#{assignment.group_category_id}
|
||||
LIMIT 1
|
||||
SQL
|
||||
group_id = group && group.id
|
||||
|
||||
homework = Submission.build(
|
||||
homework = Submission.new(
|
||||
:assignment_id => assignment.id,
|
||||
:user_id => entry.user_id,
|
||||
:group_id => group_id,
|
||||
|
|
Loading…
Reference in New Issue