Improve application version-related logic
This commit is contained in:
		
							parent
							
								
									02a7352614
								
							
						
					
					
						commit
						44451e0f0f
					
				
					 1 changed files with 12 additions and 0 deletions
				
			
		|  | @ -52,6 +52,18 @@ class ApplicationVersion(Model): | |||
|         default=None, | ||||
|         metadata=config(exclude=Exclude.ALWAYS) | ||||
|     ) | ||||
|     installed: Optional[bool] = field( | ||||
|         default=False, | ||||
|         metadata=config(exclude=Exclude.ALWAYS) | ||||
|     ) | ||||
|     supported: Optional[bool] = field( | ||||
|         default=False, | ||||
|         metadata=config(exclude=Exclude.ALWAYS) | ||||
|     ) | ||||
| 
 | ||||
|     def __post_init__(self): | ||||
|         self.installed = self.is_installed() | ||||
|         self.supported = self.is_supported() | ||||
| 
 | ||||
|     def get_installation_path(self): | ||||
|         return f'{Constants.SP_APPLICATION_DATA_HOME}/{self.application_code}/{self.version_number}' | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue