fix laoding issue

fix missing mtm
This commit is contained in:
2025-12-09 08:29:24 +01:00
parent 0c1287d3b9
commit 861984e4b1
2 changed files with 2 additions and 2 deletions

View File

@@ -405,7 +405,7 @@ export default async function resourceRoutes(server: FastifyInstance) {
if(resourceConfig[resource].mtoLoad) {
for await (const relation of resourceConfig[resource].mtoLoad ) {
if(data[relation]) {
data[relation] = await server.db.select().from(resourceConfig[relation + "s"].table).where(eq(resourceConfig[relation + "s"].table.id, data[relation]))
data[relation] = (await server.db.select().from(resourceConfig[relation + "s"].table).where(eq(resourceConfig[relation + "s"].table.id, data[relation])))[0]
}
}
}