Closed jayaddison closed 1 month ago
To replicate the error:
$ curl -H 'Content-Type: application/json' -H 'Authorization: Bearer video-api-token' -XPATCH http://127.0.0.1:2342/api/proposal/2 --data '{"video_recording_lost": false}'
Expected:
video_recording_lost
Actual:
Cause:
The falsy-fallback evaluation below (false or "") emits a str value, and that causes a type mismatch when attempting to write to the db.Boolean video_recording_lost database column:
false or ""
str
db.Boolean
https://github.com/emfcamp/Website/blob/888fb8b7d63c7560376bc2d5670b0e46f61fdce0/apps/api/schedule.py#L55
Relates:
To replicate the error:
Expected:
video_recording_lost
flag set to false in the database.Actual:
Cause:
The falsy-fallback evaluation below (
false or ""
) emits astr
value, and that causes a type mismatch when attempting to write to thedb.Boolean
video_recording_lost
database column:https://github.com/emfcamp/Website/blob/888fb8b7d63c7560376bc2d5670b0e46f61fdce0/apps/api/schedule.py#L55
Relates: