Fix: Ensure Imported Furniture catalog page is created during import
The getOrCreateImportedParentPage() function was skipping database checks due to an early return cache check. This caused the 'imported_furni' catalog page to not be created when missing, preventing imported furniture from appearing in the catalog. Removed the cache early return so the function always queries the DB and creates the page if needed.
This commit is contained in:
1 parent
01369d8943
commit
7ad78db0ea
1 file changed
-2
@@ -166,8 +166,6 @@ async function dedupeCatalogPage(
|
||||
* Caches the page ID in-memory for the process lifetime to avoid redundant DB reads
|
||||
* during batch imports */
|
||||
export async function getOrCreateImportedParentPage(): Promise<number> {
|
||||
if (parentIdCache !== null) return parentIdCache;
|
||||
|
||||
const [existing] = await db
|
||||
.select({ id: CatalogPages.id })
|
||||
.from(CatalogPages)
|
||||
|
||||
Reference in new issue
Block a user