Preload School.Region for user different from school

This commit is contained in:
Andrea Fazzi 2022-03-15 11:34:20 +01:00
parent 3b7523cb22
commit 352b319aad

View file

@ -332,6 +332,7 @@ func (model *Participant) ReadAll(db *Database, args map[string]string, w http.R
if err := db._db. if err := db._db.
Preload("Category"). Preload("Category").
Preload("School"). Preload("School").
Preload("School.Region").
Preload("Contests"). Preload("Contests").
Preload("Responses"). Preload("Responses").
Order("created_at").Find(&participants).Error; err != nil { Order("created_at").Find(&participants).Error; err != nil {