From 53eda6d78a4c8714dfdd198ad61f2505c894dcde Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Mon, 21 May 2012 20:18:33 +0200 Subject: [PATCH] Fix problem with updating parsed template in DB The parsed template would not always be updated correctly when the actual template object had not changed (only the contents). This change forces an update by making a copy. Signed-off-by: Zane Bitter --- heat/engine/parser.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/heat/engine/parser.py b/heat/engine/parser.py index 110a2444..5e0723db 100644 --- a/heat/engine/parser.py +++ b/heat/engine/parser.py @@ -180,8 +180,7 @@ class Stack(object): pt = db_api.parsed_template_get(None, self.parsed_template_id) if pt: - pt.template = self.t - pt.save() + pt.update_and_save({'template': self.t.copy()}) else: logger.warn('Cant find parsed template to update %d' % \ self.parsed_template_id) @@ -221,8 +220,6 @@ class Stack(object): else: self.status_set(self.CREATE_COMPLETE) - self.update_parsed_template() - def create(self): pool = eventlet.GreenPool() -- 2.45.2