Open uladkasach opened 1 year ago
e.g., from
searchTermId: googleAdsExposureTrigger.searchTerm.id
? googleAdsExposureTrigger.searchTerm.id
: (
await googleAdsSearchTermDao.upsert({
dbConnection,
googleAdsSearchTerm: googleAdsExposureTrigger.searchTerm,
})
).id,
to
searchTermId: googleAdsExposureTrigger.searchTerm
? googleAdsExposureTrigger.searchTerm.id
? googleAdsExposureTrigger.searchTerm.id
: (
await googleAdsSearchTermDao.upsert({
dbConnection,
googleAdsSearchTerm: googleAdsExposureTrigger.searchTerm,
})
).id
: null,
right now, in the upsert function, it is trying to resolve the domain value object id without checking if the input for that property was null
typescript is catching this so no biggie, but its making the user have to fix it themselves