mirror of
				https://github.com/Neocky/pluGET.git
				synced 2024-04-29 16:12:30 +00:00 
			
		
		
		
	Fix findLatestBuild check returning false on a successful API response.
This commit is contained in:
		| @@ -76,7 +76,7 @@ def findLatestBuild(paperVersionGroup): | ||||
|         return False | ||||
|     url = f"https://papermc.io/api/v2/projects/paper/version_group/{paperVersionGroup}/builds" | ||||
|     papermcbuilds = doAPIRequest(url) | ||||
|     if papermcbuilds["status"] == 404: | ||||
|     if "status" in papermcbuilds:  # Checks if the API returns a status. This means that there was an error. | ||||
|         return False | ||||
|     latestPaperBuild = papermcbuilds["builds"][-1]["build"] | ||||
|     return latestPaperBuild | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zander
					Zander