mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-22 14:19:28 +00:00
Added commit to the base class
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from django.conf import settings
|
||||
from django.db import connections
|
||||
from django.db import connections, transaction
|
||||
|
||||
def get_api(api):
|
||||
|
||||
@@ -82,3 +82,6 @@ class BaseDBService(BaseService):
|
||||
self._dbcursor = self.db.cursor()
|
||||
return self._dbcursor
|
||||
|
||||
def commit(self):
|
||||
transaction.commit_unless_managed(using=self.settings['database_name'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user