Index: appengine/cmd/dm/mutate/merge_quest.go |
diff --git a/appengine/cmd/dm/mutate/merge_quest.go b/appengine/cmd/dm/mutate/merge_quest.go |
index 80bc506fc4086c9ae0fd6edade4fe1bfa60f9d84..54fb90ab0531b7875808db44e0ee69bbcf29942b 100644 |
--- a/appengine/cmd/dm/mutate/merge_quest.go |
+++ b/appengine/cmd/dm/mutate/merge_quest.go |
@@ -15,19 +15,20 @@ import ( |
// MergeQuest ensures that the given Quest exists and contains the merged |
// set of BuiltBy entries. |
type MergeQuest struct { |
- Quest *model.Quest |
+ Quest *model.Quest |
+ AndThen []tumble.Mutation |
} |
// Root implements tumble.Mutation. |
func (m *MergeQuest) Root(c context.Context) *datastore.Key { |
- return datastore.Get(c).KeyForObj(m.Quest) |
+ return model.QuestKeyFromID(c, m.Quest.ID) |
} |
// RollForward implements tumble.Mutation. |
func (m *MergeQuest) RollForward(c context.Context) (muts []tumble.Mutation, err error) { |
ds := datastore.Get(c) |
- curQuest := &model.Quest{ID: m.Quest.ID} |
+ curQuest := model.QuestFromID(m.Quest.ID) |
c = logging.SetField(c, "qid", m.Quest.ID) |
@@ -49,6 +50,8 @@ func (m *MergeQuest) RollForward(c context.Context) (muts []tumble.Mutation, err |
logging.WithError(err).Errorf(c, "%s", reason) |
} |
+ muts = m.AndThen |
+ |
return |
} |