Skip to content

Commit

Permalink
update model logic w/signoff
Browse files Browse the repository at this point in the history
Signed-off-by: Jougan-0 <prasantmishra2018@gmail.com>
  • Loading branch information
Jougan-0 committed Oct 17, 2024
1 parent 8a63e04 commit 35d1cbf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions models/registration/svg_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}
Expand All @@ -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 {
Expand All @@ -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
}
Expand Down

0 comments on commit 35d1cbf

Please sign in to comment.