def rollback_unless_managed(self):
        self.validate_thread_sharing()
        if not self.is_managed():
            self._rollback()
        else:
            self.set_dirty()
Rolls back changes if the system is not in managed transaction mode.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/db/backends/__init__.py/BaseDatabaseWrapper.rollback_unless_managed