fix(core/room): use null instead of empty parent

This commit is contained in:
Cilly Leang 2026-04-12 01:02:53 +10:00
parent 29a804b0fb
commit 415ce8d88f
Signed by: cilly
GPG key ID: 6500251E087653C9
2 changed files with 2 additions and 2 deletions

View file

@ -15,7 +15,7 @@ interface StopDao {
@Query(""" @Query("""
SELECT * FROM Stop SELECT * FROM Stop
WHERE platformCode <> "" WHERE platformCode <> ""
AND parent == "" AND parent IS NULL
""") """)
suspend fun getAllParentless(): List<StopEntity> suspend fun getAllParentless(): List<StopEntity>

View file

@ -31,7 +31,7 @@ class GtfsDataFixer(
) )
log("datafixer", "inserting ${parentId} for ${stops.size} children") log("datafixer", "inserting ${parentId} for ${stops.size} children")
dao.insertAll(parent) dao.insertAll(parent)
database.stopDao.updateParents(stops.map { it.id }, parentId) dao.updateParents(stops.map { it.id }, parentId)
} }
} }
} }