libfic: fix missing field retrieve in EFile

This commit is contained in:
nemunaire 2018-09-07 20:32:56 +02:00 committed by Pierre-Olivier Mercier
parent f9e1cf6691
commit dcfb34c6fd

View File

@ -77,7 +77,7 @@ func GetFileByPath(path string) (EFile, error) {
path = strings.TrimPrefix(path, FilesDir)
var f EFile
if err := DBQueryRow("SELECT id_file, origin, path, name, cksum, size FROM exercice_files WHERE path = ?", path).Scan(&f.Id, &f.origin, &f.Path, &f.Name, &f.Checksum, &f.Size); err != nil {
if err := DBQueryRow("SELECT id_file, origin, path, id_exercice, name, cksum, size FROM exercice_files WHERE path = ?", path).Scan(&f.Id, &f.origin, &f.Path, &f.IdExercice, &f.Name, &f.Checksum, &f.Size); err != nil {
return f, err
}