def get_object(self, request, object_id, from_field=None):
        queryset = self.get_queryset(request)
        model = queryset._document
        field = model._meta.pk if from_field is None else model._meta.get_field(from_field)
        try:
            object_id = field.to_python(object_id)
            return queryset.get(**{field.name: object_id})
        except (model.DoesNotExist, ValidationError, ValueError):
            return None
Init.
dataset/ETHPy150Open jschrewe/django-mongoadmin/mongoadmin/options.py/DocumentAdmin.get_object--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/ext/mapreduce/api/map_job/mapper.py/Mapper.__init__