From 35d1cbf52ade71448a7a71084b6cdf580b32ce74 Mon Sep 17 00:00:00 2001 From: Jougan-0 Date: Thu, 17 Oct 2024 20:56:16 +0530 Subject: [PATCH] update model logic w/signoff Signed-off-by: Jougan-0 --- models/registration/svg_helper.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/models/registration/svg_helper.go b/models/registration/svg_helper.go index 05b77142..351d22ee 100644 --- a/models/registration/svg_helper.go +++ b/models/registration/svg_helper.go @@ -59,7 +59,7 @@ func WriteAndReplaceSVGWithFileSystemPath(svgColor, svgWhite, svgComplete string } White: - if svgWhite != "" && !isModel { + if svgWhite != "" { path := filepath.Join(baseDir, dirname, "white") err := os.MkdirAll(path, 0777) if err != nil { @@ -71,7 +71,7 @@ White: hash := md5.Sum([]byte(svgWhite)) hashString := hex.EncodeToString(hash[:]) pathsvg := hashCheckSVG[hashString] - if pathsvg != "" { // the image has already been loaded, point the component to that path + if pathsvg != "" && !isModel { // the image has already been loaded, point the component to that path svgWhitePath = pathsvg goto Complete } @@ -90,7 +90,7 @@ White: } Complete: - if svgComplete != "" && !isModel { + if svgComplete != "" { path := filepath.Join(baseDir, dirname, "complete") err := os.MkdirAll(path, 0777) if err != nil { @@ -102,7 +102,7 @@ Complete: hash := md5.Sum([]byte(svgComplete)) hashString := hex.EncodeToString(hash[:]) pathsvg := hashCheckSVG[hashString] - if pathsvg != "" { // the image has already been loaded, point the component to that path + if pathsvg != "" && !isModel { // the image has already been loaded, point the component to that path svgCompletePath = pathsvg return }