def get(self, *args, **kwargs):
        clone = self.filter(*args, **kwargs)
        if self.query.can_filter():
            clone = clone.order_by()
        num = len(clone)
        if num == 1:
            return clone._result_cache[0]
        if not num:
            raise self.model.DoesNotExist(
                "%s matching query does not exist. "
                "Lookup parameters were %s" %
                (self.model._meta.object_name, kwargs))
        raise self.model.MultipleObjectsReturned(
            "get() returned more than one %s -- it returned %s! "
            "Lookup parameters were %s" %
            (self.model._meta.object_name, num, kwargs))
Checks that a user has capabilities in a list.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/db/models/query.py/QuerySet.get--crossover with--dataset/ETHPy150Open ProgVal/Limnoria/src/ircdb.py/checkCapabilities