From: Mohamed Larabi Date: Thu, 21 Nov 2013 11:37:09 +0000 (+0100) Subject: update_cert_records() uses global_dbsession X-Git-Tag: sfa-3.1-1~24 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=da12838ac0d6ef1617ea0ce7da234e03f4198e5e;p=sfa.git update_cert_records() uses global_dbsession --- diff --git a/sfa/server/sfa-start.py b/sfa/server/sfa-start.py index 1596cc3f..0dd53b6e 100755 --- a/sfa/server/sfa-start.py +++ b/sfa/server/sfa-start.py @@ -130,8 +130,9 @@ def update_cert_records(gids): Removes old records from the db. """ # import db stuff here here so this module can be loaded by PlcComponentApi - from sfa.storage.alchemy import dbsession + from sfa.storage.alchemy import global_dbsession from sfa.storage.model import RegRecord + dbsession = global_dbsession if not gids: return # get records that actually exist in the db