Restore dao_create_template and use custom template fixture instead

This commit is contained in:
Imdad Ahad
2017-03-08 13:03:44 +00:00
parent 36d52c6e42
commit a4dc614ef7
4 changed files with 50 additions and 43 deletions

View File

@@ -13,8 +13,8 @@ from app.dao.dao_utils import (
@transactional
@version_class(Template, TemplateHistory)
def dao_create_template(template, template_id=None):
template.id = template_id or uuid.uuid4() # must be set now so version history model can use same id
def dao_create_template(template):
template.id = uuid.uuid4() # must be set now so version history model can use same id
template.archived = False
db.session.add(template)