Skip to content

Commit

Permalink
Merge pull request #611 from Jougan-0/fixlogic
Browse files Browse the repository at this point in the history
update model logic w/signoff
  • Loading branch information
Jougan-0 authored Oct 17, 2024
2 parents 8a63e04 + 35d1cbf commit 868cbfb
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 868cbfb

Please sign in to comment.