Files can now depends on MCQ

This commit is contained in:
nemunaire 2020-01-20 17:28:37 +01:00
commit e937073588
8 changed files with 90 additions and 28 deletions

View file

@ -184,7 +184,7 @@ func (k FlagKey) Update() (int64, error) {
// Delete the flag from the database.
func (k FlagKey) Delete() (int64, error) {
if _, err := DBExec("DELETE FROM exercice_files_deps WHERE id_flag = ?", k.Id); err != nil {
if _, err := DBExec("DELETE FROM exercice_files_okey_deps WHERE id_flag = ?", k.Id); err != nil {
return 0, err
} else if _, err := DBExec("DELETE FROM exercice_mcq_okey_deps WHERE id_flag_dep = ?", k.Id); err != nil {
return 0, err