Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayd2020 committed Feb 21, 2024
1 parent 9de1e1e commit 0c7f0b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/transactions/club.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 0c7f0b0

Please sign in to comment.