Skip to content

Commit

Permalink
Fixing default image path saved for importer
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Nemere committed Mar 26, 2024
1 parent e3d7f29 commit af7fdf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/dataimport/internal/output/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func insertDefaultImage(db *mongo.Database, scanId string, defaultImage string,
coll := db.Collection(dbCollections.ScanDefaultImagesName)
opt := options.InsertOne()

defaultImageResult, err := coll.InsertOne(context.TODO(), &protos.ScanImageDefaultDB{ScanId: scanId, DefaultImageFileName: defaultImage}, opt)
defaultImageResult, err := coll.InsertOne(context.TODO(), &protos.ScanImageDefaultDB{ScanId: scanId, DefaultImageFileName: path.Join(scanId, defaultImage)}, opt)
if err != nil {
if mongo.IsDuplicateKeyError(err) {
// Don't overwrite, so we're OK with this
Expand Down

0 comments on commit af7fdf7

Please sign in to comment.