x
This commit is contained in:
1 parent
ae3799d8ce
commit
0341b30b6d
9 files changed
+947
-51
No files matched your search
@@ -734,7 +734,7 @@ export async function hydrateSectionPayload(section: any, lang: string) {
|
||||
if (Array.isArray(payload.categoryIds) && payload.categoryIds.length > 0) {
|
||||
const ids = payload.categoryIds.map(Number);
|
||||
categories = await prisma.category.findMany({
|
||||
where: { id: { in: ids } },
|
||||
where: { id: { in: ids }, deletedAt: null },
|
||||
include: {
|
||||
translations: true,
|
||||
_count: {
|
||||
@@ -745,6 +745,7 @@ export async function hydrateSectionPayload(section: any, lang: string) {
|
||||
categories.sort((a, b) => ids.indexOf(a.id) - ids.indexOf(b.id));
|
||||
} else {
|
||||
categories = await prisma.category.findMany({
|
||||
where: { deletedAt: null },
|
||||
include: {
|
||||
translations: true,
|
||||
_count: {
|
||||
|
||||
Reference in new issue
Block a user