tell me which of the two things is not set
This commit is contained in:
		
							parent
							
								
									9fe3937d88
								
							
						
					
					
						commit
						2c09cfe11e
					
				@ -25,8 +25,10 @@ class DiscourseAuth:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def get_headers(self):
 | 
					    def get_headers(self):
 | 
				
			||||||
        """Return headers for API requests."""
 | 
					        """Return headers for API requests."""
 | 
				
			||||||
        if not self.api_key or not self.username:
 | 
					        if not self.api_key:
 | 
				
			||||||
            raise ValueError("API key and username must be set")
 | 
					            raise ValueError("API Key is not set.")
 | 
				
			||||||
 | 
					        if not self.username:
 | 
				
			||||||
 | 
					            raise ValueError("API sername is not set.")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
            "api_key": self.api_key,
 | 
					            "api_key": self.api_key,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user