Improve client version comparison-related logic
This commit is contained in:
		
							parent
							
								
									4cd0da05b1
								
							
						
					
					
						commit
						1f2cd19d1c
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
					@ -11,7 +11,13 @@ class ClientVersionController:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @staticmethod
 | 
					    @staticmethod
 | 
				
			||||||
    def is_latest(client_version):
 | 
					    def is_latest(client_version):
 | 
				
			||||||
        return client_version.version_number == ClientVersion.latest().version_number
 | 
					
 | 
				
			||||||
 | 
					        latest_client_version = ClientVersion.latest()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if latest_client_version is None:
 | 
				
			||||||
 | 
					            return True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return client_version.version_number == latest_client_version.version_number
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @staticmethod
 | 
					    @staticmethod
 | 
				
			||||||
    def get(version_number: str):
 | 
					    def get(version_number: str):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue