(cls, domain, contact_id)
return objs[0]
Looks up the open sms survey session for the given domain and contact_id.
        Only one session is expected to be open at a time.
        Raises MultipleResultsFound if more than one session is open.
Looks up the open sms survey session for the given domain and contact_id.
        Only one session is expected to be open at a time.
        Raises MultipleResultsFound if more than one session is open.
Looks up the open sms survey session for the given domain and contact_id . Only one session is expected to be open at a time . Raises MultipleResultsFound if more than one session is open .
def get_open_sms_session(cls, domain, contact_id):
        """
        Looks up the open sms survey session for the given domain and contact_id.
        Only one session is expected to be open at a time.
        Raises MultipleResultsFound if more than one session is open.
        """
        objs = cls.get_all_open_sms_sessions(domain, contact_id).all()
        if len(objs) > 1:
            raise MultipleResultsFound('more than 1 ({}) session found for domain {} and contact {}'.format(
                len(objs), domain, contact_id
            ))
        elif len(objs) == 0:
            return None
        return objs[0]
def get_open_sms_session ( cls , domain , contact_id ) : objs = cls . get_all_open_sms_sessions ( domain , contact_id ) . all ( ) if len ( objs ) > 1 : raise MultipleResultsFound ( 'more than 1 ({}) session found for domain {} and contact {}' . format ( len ( objs ) , domain , contact_id ) ) elif len ( objs ) == 0 : return None return objs [ 0 ]