migrate code

This commit is contained in:
Salvatore Giordano
2021-04-20 12:44:22 +02:00
parent 987da10cba
commit bc9e0d0285
4 changed files with 47 additions and 60 deletions
@@ -27,7 +27,7 @@ class ChannelModel {
createdAt = createdAt ?? DateTime.now(),
updatedAt = updatedAt ?? DateTime.now(),
assert(
cid != null || (id != null && type != null),
(cid != null && cid.contains(':')) || (id != null && type != null),
'provide either a cid or an id and type',
),
id = id ?? cid!.split(':')[1],