Minor fixes

This commit is contained in:
Jakob Wennberg
2026-02-21 16:03:38 +01:00
parent 327ecd4ff2
commit 358be27e24
3 changed files with 11 additions and 7 deletions
@@ -32,9 +32,9 @@ async function ensureFiscalPeriod(
.lte('period_start', date)
.gte('period_end', date)
.eq('is_closed', false)
.single()
.limit(1)
if (existing) {
if (existing && existing.length > 0) {
return true
}