1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Fixed #3024 -- Fixed database commit() and rollback() behaviour so it works

consistently if you execute them before Django has made a database connection.
Thanks Bastian Kleineidam.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4691 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2007-03-09 07:55:40 +00:00
parent 8248569471
commit cc8d656569
7 changed files with 19 additions and 12 deletions

View File

@@ -60,10 +60,11 @@ class DatabaseWrapper(local):
return cursor
def _commit(self):
return self.connection.commit()
if self.connection is not None:
return self.connection.commit()
def _rollback(self):
if self.connection:
if self.connection is not None:
return self.connection.rollback()
def close(self):