Fix error in SQL where a string was expected bit a number was provided

The SQL had to have quotes '', but it didn't.
This caused some DNIs that started with 0 (`09950031`) to be casted into `9950031`
This commit is contained in:
Araozu 2023-10-17 10:59:03 -05:00
parent b2774f7783
commit d474b8bb55

View File

@ -88,7 +88,7 @@ impl RegisterCreate {
} else {
let res = sqlx::query!(
"SELECT MAX(register_code) AS max FROM register
WHERE register_course_id = ?",
WHERE register_course_id = '?'",
course_id
)
.fetch_one(db)