'Roll back any uncommitted transactions from the handler.'

def finish(self, *args, **kwargs):

    if self.db.dirty:
        self.log.warning('Rolling    back    dirty    objects    %s', self.db.dirty)
        self.db.rollback()
    super().finish(*args, **kwargs)
