@@ -169,8 +169,9 @@ def test_connection(self):
169169 domain_list = []
170170 for key , value in response .items ():
171171 if 'domain' in key .lower () or key .startswith ('list' ):
172+ # Handle case where value is a list (like list[] parameters)
172173 if isinstance (value , list ):
173- domain_list .extend (value )
174+ domain_list .extend (value ) # Use extend instead of append to flatten
174175 else :
175176 domain_list .append (value )
176177 elif '.' in key and not key .startswith ('<' ): # Might be domain name as key, but not HTML
@@ -229,10 +230,16 @@ def validate_domain_access(self):
229230 domain_list = []
230231 for key , value in response .items ():
231232 if 'domain' in key .lower () or key .startswith ('list' ):
232- domain_list .append (value )
233+ # Handle case where value is a list (like list[] parameters)
234+ if isinstance (value , list ):
235+ domain_list .extend (value ) # Use extend instead of append to flatten
236+ else :
237+ domain_list .append (value )
233238 elif '.' in key and not key .startswith ('<' ): # Might be domain name as key, but not HTML
234239 domain_list .append (key )
235240
241+ print (f"Parsed domain list: { domain_list } " )
242+
236243 if self .domain in domain_list :
237244 print (f"✓ Domain { self .domain } found in account" )
238245 return True , f"Domain { self .domain } is accessible"
0 commit comments