Commit db9de86
committed
fix: resolve TypeError in grades PDF generation
Resolves a `TypeError: '<=' not supported between instances of 'int' and 'str'` that occurred during grades PDF generation.
The `bimester` field in the `Grade` model is a `CharField` (e.g., '1B', '2B'), but it was being compared directly with integers in `api/students/views.py`.
The fix involves extracting the numeric part of the `bimester` string (e.g., '1B' -> 1) before using it in comparisons and as an index.1 parent 6bdd6fa commit db9de86
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
0 commit comments