fix: apps table not showing empty descriptions

This commit is contained in:
Vinicius Moreira
2019-07-30 16:06:44 -03:00
3 changed files with 12 additions and 12 deletions

View File

@@ -17,12 +17,3 @@ class ApplicationView:
self.update_checked = model.update
self.visible = visible
self.status = ApplicationViewStatus.LOADING
def get_async_attr(self, attr: str, strip_html: bool = False, default: str = '...'):
if getattr(self.model.base_data, attr) is not None or self.model.is_library():
res = getattr(self.model.base_data, attr)
else:
res = getattr(self.model.base_data, attr) if self.model.status == ApplicationStatus.READY and getattr(self.model.base_data, attr) else default
return util.strip_html(res) if res and strip_html else res