I am trying to add a subcollection to an existing collection with this line of code:

return _db.collection('agency').doc(globals.agencyId).collection('event').doc().set(event.toMap());

When I execute the code it runs fine...no errors but the subcollection and document does not get created. All of the data is in the event.map that is expected.

This was working yesterday and I have not changed the code. What am I missing here?


Solution 1: LostTexan

I found the problem. I was trying to use a TimeOfDay type and pass it into the firebase document.