Korrigiere Reihenfolge, um Foreign Keys zu respektieren
This commit is contained in:
parent
9632545d94
commit
ba839a2e86
1 changed files with 1 additions and 1 deletions
|
@ -107,8 +107,8 @@ func (r *RequestRepo) Execute(request models.Request) error {
|
|||
_, err = r.db.Exec("UPDATE officeHour SET active=true WHERE id=?", request.OfficeHour.Id)
|
||||
r.db.Exec("DELETE FROM request WHERE officeHour=?", request.OfficeHour.Id)
|
||||
case models.RequestDelete:
|
||||
err = r.officeHourRepo.Delete(request.OfficeHour)
|
||||
r.db.Exec("DELETE FROM request WHERE officeHour=?", request.OfficeHour.Id)
|
||||
err = r.officeHourRepo.Delete(request.OfficeHour)
|
||||
default:
|
||||
log.Printf("Executing request: Action type %d unknown.", request.Action)
|
||||
_, err = r.db.Exec("DELETE FROM request WHERE id=?", request.Id)
|
||||
|
|
Loading…
Reference in a new issue