MCPcopy
hub / github.com/encode/django-rest-framework / get

Method get

tests/utils.py:28–35  ·  view source on GitHub ↗
(self, **lookup)

Source from the content-addressed store, hash-verified

26 return self.items[val]
27
28 def get(self, **lookup):
29 for item in self.items:
30 if all([
31 attrgetter(key.replace('__', '.'))(item) == value
32 for key, value in lookup.items()
33 ]):
34 return item
35 raise ObjectDoesNotExist()
36
37
38class BadType:

Calls

no outgoing calls