Skip to content

Commit

Permalink
fix investment status preloading when fetching investor
Browse files Browse the repository at this point in the history
  • Loading branch information
szarbartosz committed Nov 4, 2024
1 parent 7ba66c7 commit f66a372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/investorsController.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func GetSingleInvestor(c *gin.Context) {
user, _ := c.Get("user")
var investor models.Investor

result := initializers.DB.Where("user_id = ?", user.(models.User).ID).Preload("Address").Preload("Locations").First(&investor, c.Param("id"))
result := initializers.DB.Where("user_id = ?", user.(models.User).ID).Preload("Address").Preload("Locations").Preload("Locations.Status").First(&investor, c.Param("id"))

if result.Error != nil {
c.JSON(http.StatusInternalServerError, gin.H{
Expand Down

0 comments on commit f66a372

Please sign in to comment.