From 0c7f0b01fc9b9ecdf361691ab777207f002ff477 Mon Sep 17 00:00:00 2001 From: akshayd2020 Date: Tue, 20 Feb 2024 19:43:27 -0500 Subject: [PATCH] fixes --- backend/src/transactions/club.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/transactions/club.go b/backend/src/transactions/club.go index c17d1cc3a..2c5725d5b 100644 --- a/backend/src/transactions/club.go +++ b/backend/src/transactions/club.go @@ -14,7 +14,7 @@ import ( func UpsertPointOfContact(db *gorm.DB, pointOfContact *models.PointOfContact) (*models.PointOfContact, *errors.Error) { pocExist, errPOCExist := GetPointOfContact(db, pointOfContact.ID, pointOfContact.ClubID) if errPOCExist != nil { - db.Model(&pointOfContact).Association("File").Replace(pocExist, pointOfContact) + db.Model(&pointOfContact).Where("id = ?", pocExist.ID).Association("File").Replace(pocExist, pointOfContact) } else { db.Model(&pointOfContact).Association("File").Append(pointOfContact) }