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 <zbitter@redhat.com>
This commit is contained in:
Zane Bitter 2012-05-21 20:18:33 +02:00
parent 08c7936824
commit 53eda6d78a
1 changed files with 1 additions and 4 deletions

View File

@ -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()