def rollback(self):
        self.validate_thread_sharing()
        self.validate_no_atomic_block()
        self._rollback()
        # A successful rollback means that the database connection works.
        self.errors_occurred = False

        self.run_on_commit = []
Rolls back a transaction and resets the dirty flag.
dataset/ETHPy150Open django/django/django/db/backends/base/base.py/BaseDatabaseWrapper.rollback