def undelete(self, user=None):
        # timestamps on which root obj(s) were deleted; only cascade items also
        # deleted in one of these same cascade batches should be undeleted.
        deletion_times = set([o.deleted_on for o in self.root_objs])
        for model, instances in self.data.iteritems():
            pk_list = [obj.pk for obj in instances]
            model._base_manager.filter(
                pk__in=pk_list, deleted_on__in=deletion_times).update(
                deleted_by=None, deleted_on=None)
Entrypoint.
dataset/ETHPy150Open mozilla/moztrap/moztrap/model/mtmodel.py/SoftDeleteCollector.undelete--crossover with--dataset/ETHPy150Open openstack/gerrit-dash-creator/gerrit_dash_creator/cmd/bugs.py/main