|
|
@@ -973,8 +973,8 @@ func queryEstimate(db *sql.DB, id int, user int) ( []Estimate, error ) { |
|
|
|
// Prevents runtime panics |
|
|
|
if len(estimates) == 0 { return estimates, errors.New("Estimate not found.") } |
|
|
|
|
|
|
|
for _, e := range estimates { |
|
|
|
e.Loans, err = queryLoan(db, e.Id, 0) |
|
|
|
for i := range estimates { |
|
|
|
estimates[i].Loans, err = queryLoan(db, estimates[i].Id, 0) |
|
|
|
if err != nil { return estimates, err } |
|
|
|
} |
|
|
|
|
|
|
|