Skip to content

Commit

Permalink
fix: try to fix foreign key nonsense
Browse files Browse the repository at this point in the history
  • Loading branch information
harshkhandeparkar committed Nov 18, 2023
1 parent d757717 commit 3a3dbbc
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions controllers/project_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,14 @@ func UpdateProject(w http.ResponseWriter, r *http.Request) {
}
}

secondaryMentorId := int32(secondaryMentor.ID)
updatedProj := &models.Project{
Name: reqFields.Name,
Description: reqFields.Description,
Tags: strings.Join(reqFields.Tags, ","),
RepoLink: reqFields.RepoLink,
CommChannel: reqFields.CommChannel,
ReadmeLink: reqFields.ReadmeLink,
SecondaryMentorId: &secondaryMentorId,
Name: reqFields.Name,
Description: reqFields.Description,
Tags: strings.Join(reqFields.Tags, ","),
RepoLink: reqFields.RepoLink,
CommChannel: reqFields.CommChannel,
ReadmeLink: reqFields.ReadmeLink,
SecondaryMentor: secondaryMentor,
}

tx = db.
Expand Down

0 comments on commit 3a3dbbc

Please sign in to comment.