def match_one(cls, **props):
    """
    Return an object corresponding to an existing object in the database. If
    more than one object or no object is found then return None.
    """
    match = cls.objects.filter(**props)
    if match.count() == 1:
        return match.first()
    return None