NewcastleRSE / dolfin-flutter

The Flutter-based app for the Dolfin Project
0 stars 0 forks source link

_TypeError: type 'Null' is not a subtype of type 'String' #43

Closed sentry-io[bot] closed 2 years ago

sentry-io[bot] commented 2 years ago

Sentry Issue: DOLFIN-V

_TypeError: type 'Null' is not a subtype of type 'String'
  File "child_model.dart", line 28, in new ChildModel.fromjson
  File "firestore_crud.dart", line 39, in FireStoreCrud.getChildren.<fn>.<fn>
  File "firestore_crud.dart", line 40, in FireStoreCrud.getChildren.<fn>
...
(31 additional frame(s) were not displayed)
mdsimpson42 commented 2 years ago

The data has changed, discharge data has been added, but it wasn't there previously. And child without a discharge date will cause this error. This will not be a problem for any children created moving forward.

There are two options a) delete all children created before this date, or amend them to include a discharge date or b) deal with the problem programmatically, but what date should we use if no discharge date is provided?