@@ -163,21 +163,20 @@ protected TemplateJoinDaoImpl() {
163163 }
164164
165165 private String getTemplateStatus (TemplateJoinVO template ) {
166+ if (template .getDownloadState () == Status .DOWNLOADED ) {
167+ return "Download Complete" ;
168+ }
166169 String templateStatus = "Processing" ;
167- if (template .getDownloadState () != Status .DOWNLOADED ) {
168- if (template .getDownloadState () == Status .DOWNLOAD_IN_PROGRESS ) {
169- if (template .getDownloadPercent () == 100 ) {
170- templateStatus = "Installing Template" ;
171- } else {
172- templateStatus = template .getDownloadPercent () + "% Downloaded" ;
173- }
174- } else if (template .getDownloadState () == Status .BYPASSED ) {
175- templateStatus = "Bypassed Secondary Storage" ;
176- } else if (StringUtils .isNotBlank (template .getErrorString ())) {
177- templateStatus = template .getErrorString ().trim ();
170+ if (template .getDownloadState () == Status .DOWNLOAD_IN_PROGRESS ) {
171+ if (template .getDownloadPercent () == 100 ) {
172+ templateStatus = "Installing Template" ;
173+ } else {
174+ templateStatus = template .getDownloadPercent () + "% Downloaded" ;
178175 }
179- } else if (template .getDownloadState () == Status .DOWNLOADED ) {
180- templateStatus = "Download Complete" ;
176+ } else if (template .getDownloadState () == Status .BYPASSED ) {
177+ templateStatus = "Bypassed Secondary Storage" ;
178+ } else if (StringUtils .isNotBlank (template .getErrorString ())) {
179+ templateStatus = template .getErrorString ().trim ();
181180 }
182181 return templateStatus ;
183182 }
0 commit comments