'Undelete this instance, making it available to all manager methods
again and restoring its version number.
Return False if it was not marked as deleted, True otherwise.
May raise IntegrityError if another instance has been uploaded with the
same version number in the meantime.'

def undelete(self):

    if (not self.deleted):
        return False
    data = Extension.extract_manifest_fields(self.manifest, ('version',))
    self.update(deleted=False, **data)
    return True
