src/reversion/revisions.py
def end(self):
        """Ends a revision for this thread."""
        self._assert_active()
        stack_frame = self._stack.pop()
        if self._stack:
            self._current_frame.join(stack_frame)
        else:
            try:
                if not stack_frame.is_invalid:
                    # Save the revision data.
                    for manager, manager_context in stack_frame.objects.items():
                        revision = manager.save_revision(
                            dict(
                                (obj, self._prepare_data(type, data))
                                for obj, (type, data)
                                in manager_context.items()
                                if obj.pk is not None
                            ),
                            user = self._user,
                            comment = self._comment,
                            meta = stack_frame.meta,
                            db = self._db,
                        )
                        if revision:
                            for callback in self._callbacks:
                                callback(revision)
            finally:
                self.clear()
Ends a revision for this thread.
Ends a revision for this thread.
Ends a revision for this thread .
def end(self):
        self._assert_active()
        stack_frame = self._stack.pop()
        if self._stack:
            self._current_frame.join(stack_frame)
        else:
            try:
                if not stack_frame.is_invalid:
                    for manager, manager_context in stack_frame.objects.items():
                        revision = manager.save_revision(
                            dict(
                                (obj, self._prepare_data(type, data))
                                for obj, (type, data)
                                in manager_context.items()
                                if obj.pk is not None
                            ),
                            user = self._user,
                            comment = self._comment,
                            meta = stack_frame.meta,
                            db = self._db,
                        )
                        if revision:
                            for callback in self._callbacks:
                                callback(revision)
            finally:
                self.clear()
def end ( self ) : self . _assert_active ( ) stack_frame = self . _stack . pop ( ) if self . _stack : self . _current_frame . join ( stack_frame ) else : try : if not stack_frame . is_invalid : for manager , manager_context in stack_frame . objects . items ( ) : revision = manager . save_revision ( dict ( ( obj , self . _prepare_data ( type , data ) ) for obj , ( type , data ) in manager_context . items ( ) if obj . pk is not None ) , user = self . _user , comment = self . _comment , meta = stack_frame . meta , db = self . _db , ) if revision : for callback in self . _callbacks : callback ( revision ) finally : self . clear ( )
Ends a revision for this thread.
Ends a revision for this thread .
"""Ends a revision for this thread.""" # Save the revision data.
self