mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-11-04 09:57:29 +03:00 
			
		
		
		
	Fix optional vector arguments failing
This commit is contained in:
		
							parent
							
								
									3fda7efeb9
								
							
						
					
					
						commit
						423efc4360
					
				| 
						 | 
					@ -392,15 +392,14 @@ class TLGenerator:
 | 
				
			||||||
           a parameter upon creating the request. Returns False otherwise
 | 
					           a parameter upon creating the request. Returns False otherwise
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        if arg.is_vector:
 | 
					        if arg.is_vector:
 | 
				
			||||||
            builder.writeln(
 | 
					            builder.write('self.{0} = [{1}(_x) for _x in {0}]'
 | 
				
			||||||
                'self.{0} = [{1}(_x) for _x in {0}]'
 | 
					                          .format(arg.name, get_input_code))
 | 
				
			||||||
                .format(arg.name, get_input_code)
 | 
					 | 
				
			||||||
            )
 | 
					 | 
				
			||||||
            pass
 | 
					 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            builder.writeln(
 | 
					            builder.write('self.{0} = {1}({0})'
 | 
				
			||||||
                'self.{0} = {1}({0})'.format(arg.name, get_input_code)
 | 
					                          .format(arg.name, get_input_code))
 | 
				
			||||||
            )
 | 
					        builder.writeln(
 | 
				
			||||||
 | 
					            ' if {} else None'.format(arg.name) if arg.is_flag else ''
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @staticmethod
 | 
					    @staticmethod
 | 
				
			||||||
    def get_file_name(tlobject, add_extension=False):
 | 
					    def get_file_name(tlobject, add_extension=False):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user