(self, requesting_user)
return [get_phone_info(phone) for phone in self.phone_numbers]
Returns information about the status of each of this user's phone numbers.
        requesting_user - The user that is requesting this information (from a view)
Returns information about the status of each of this user's phone numbers.
        requesting_user - The user that is requesting this information (from a view)
Returns information about the status of each of this user s phone numbers . requesting_user - The user that is requesting this information ( from a view )
def phone_numbers_extended(self, requesting_user):
        """
        Returns information about the status of each of this user's phone numbers.
        requesting_user - The user that is requesting this information (from a view)
        """
        from corehq.apps.sms.models import PhoneNumber
        from corehq.apps.hqwebapp.doc_info import get_object_url

        phone_entries = self.get_phone_entries()

        def get_phone_info(phone):
            info = {}
            phone_entry = phone_entries.get(apply_leniency(phone))

            if phone_entry and phone_entry.verified:
                status = 'verified'
            elif phone_entry and phone_entry.pending_verification:
                status = 'pending'
            else:
                duplicate = PhoneNumber.get_reserved_number(phone)
                if duplicate:
                    status = 'duplicate'
                    if requesting_user.is_member_of(duplicate.domain):
                        info['dup_url'] = get_object_url(duplicate.domain,
                            duplicate.owner_doc_type, duplicate.owner_id)
                else:
                    status = 'unverified'

            info.update({'number': phone, 'status': status})
            return info

        return [get_phone_info(phone) for phone in self.phone_numbers]
def phone_numbers_extended ( self , requesting_user ) : from corehq . apps . sms . models import PhoneNumber from corehq . apps . hqwebapp . doc_info import get_object_url phone_entries = self . get_phone_entries ( ) def get_phone_info ( phone ) : info = { } phone_entry = phone_entries . get ( apply_leniency ( phone ) ) if phone_entry and phone_entry . verified : status = 'verified' elif phone_entry and phone_entry . pending_verification : status = 'pending' else : duplicate = PhoneNumber . get_reserved_number ( phone ) if duplicate : status = 'duplicate' if requesting_user . is_member_of ( duplicate . domain ) : info [ 'dup_url' ] = get_object_url ( duplicate . domain , duplicate . owner_doc_type , duplicate . owner_id ) else : status = 'unverified' info . update ( { 'number' : phone , 'status' : status } ) return info return [ get_phone_info ( phone ) for phone in self . phone_numbers ]