forked from firka/student-legacy
fixed db error
This commit is contained in:
parent
f8e2da3345
commit
1ded31491a
@ -129,8 +129,17 @@ class UserDatabaseQuery {
|
||||
String? recipientsJson = userData.elementAt(0)["recipients"] as String?;
|
||||
if (recipientsJson == null) return [];
|
||||
List<SendRecipient> recipients = (jsonDecode(recipientsJson) as List)
|
||||
.map((e) =>
|
||||
SendRecipient.fromJson(e, SendRecipientType.fromJson(e['tipus'])))
|
||||
.map((e) => SendRecipient.fromJson(
|
||||
e,
|
||||
SendRecipientType.fromJson(e != null
|
||||
? e['tipus']
|
||||
: {
|
||||
'azonosito': '',
|
||||
'kod': '',
|
||||
'leiras': '',
|
||||
'nev': '',
|
||||
'rovidNev': ''
|
||||
})))
|
||||
.toList();
|
||||
return recipients;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user