sparcs-kaist / otl-app

Online Timeplanner with Lectures Plus App @ KAIST
https://otl.sparcs.org
GNU General Public License v3.0
12 stars 1 forks source link

[BUG] Incorrect server response `/session/info` #21

Closed sboh1214 closed 3 years ago

sboh1214 commented 3 years ago

Description

Same as title

To Reproduce

Get response of /session/info and parse.

Expected behavior

Client should get required property User.reviews[].userspecificIsLiked.

Error Log

_TypeError (type 'Null' is not a subtype of type 'bool')
new Review.fromJson (/Users/sboh1214/Repos/otl-app/lib/models/review.dart:43)
new User.fromJson.<anonymous closure> (/Users/sboh1214/Repos/otl-app/lib/models/user.dart:77)
List.forEach (dart:core-patch/growable_array.dart:403)
new User.fromJson (/Users/sboh1214/Repos/otl-app/lib/models/user.dart:76)
InfoModel.getUser (/Users/sboh1214/Repos/otl-app/lib/providers/info_model.dart:67)
<asynchronous gap> (알 수 없는 소스:0)
InfoModel.getInfo (/Users/sboh1214/Repos/otl-app/lib/providers/info_model.dart:50)
<asynchronous gap> (알 수 없는 소스:0)
sboh1214 commented 3 years ago

Fixed in sparcs-kaist/otlplus#816 by Add "reviews": json_encode_list(profile.reviews.all()), in apps/session/views.py def info(request): Waiting for apply in prod server

sboh1214 commented 3 years ago

Apply in sparcs-kaist/otlplus#826 Prod Version v3.2.3.0