You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
box-o-sand/ares/server/families.py

13 lines
306 B

from server.resource import Resource
class Families(Resource):
__collection__ = 'families'
__required_keys__ = ('surname',)
def get_by_surname(self, surname):
for family in self.getall():
if family['surname'] == surname:
return family
return None