Removed all commented out db.close
This commit is contained in:
@@ -47,7 +47,6 @@ class ProfilePlugin(Plugin):
|
||||
for profile in profiles:
|
||||
temp.append(profile.to_dict(self.to_dict))
|
||||
|
||||
#db.close()
|
||||
return temp
|
||||
|
||||
def save(self):
|
||||
@@ -84,7 +83,6 @@ class ProfilePlugin(Plugin):
|
||||
|
||||
profile_dict = p.to_dict(self.to_dict)
|
||||
|
||||
#db.close()
|
||||
return jsonified({
|
||||
'success': True,
|
||||
'profile': profile_dict
|
||||
@@ -95,7 +93,6 @@ class ProfilePlugin(Plugin):
|
||||
db = get_session()
|
||||
default = db.query(Profile).first()
|
||||
default_dict = default.to_dict(self.to_dict)
|
||||
#db.close()
|
||||
|
||||
return default_dict
|
||||
|
||||
@@ -113,7 +110,6 @@ class ProfilePlugin(Plugin):
|
||||
order += 1
|
||||
|
||||
db.commit()
|
||||
#db.close()
|
||||
|
||||
return jsonified({
|
||||
'success': True
|
||||
@@ -137,8 +133,6 @@ class ProfilePlugin(Plugin):
|
||||
except Exception, e:
|
||||
message = log.error('Failed deleting Profile: %s', e)
|
||||
|
||||
#db.close()
|
||||
|
||||
return jsonified({
|
||||
'success': success,
|
||||
'message': message
|
||||
|
||||
Reference in New Issue
Block a user