diff --git a/lib/database.dart b/lib/database.dart index 0661ec8..48677be 100644 --- a/lib/database.dart +++ b/lib/database.dart @@ -96,9 +96,9 @@ class Database extends _$Database { for (final model in models) { await into(performances).insert(Performance( recording: recording.id, - person: model.person.id, - ensemble: model.ensemble.id, - role: model.role.id, + person: model.person?.id, + ensemble: model.ensemble?.id, + role: model.role?.id, )); } });