Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export function parseGetLiveObjectVersionPayload(
export function parseLovRecordCountsPayload(data: StringKeyMap): ValidatedPayload<LovRecordCountsPayload> {
const ids = data?.ids || []

if (!ids.length) {
if (!ids.length || ids.includes(null)) {
return { isValid: false, error: '"ids" was missing or empty' }
}

Expand Down
2 changes: 1 addition & 1 deletion core-api/src/routes/namespace/namespacePayloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function parseGetNamespacePayload(data: StringKeyMap): ValidatedPayload<G
export function parseNamespaceRecordCountsPayload(data: StringKeyMap): ValidatedPayload<NamespaceRecordCountsPayload> {
const nsps = data?.nsps || []

if (!nsps.length) {
if (!nsps.length || nsps.includes(null)) {
return { isValid: false, error: '"nsps" was missing or empty' }
}

Expand Down
7 changes: 6 additions & 1 deletion shared/src/lib/core/db/services/liveObjectVersionServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,18 @@ export async function resolveLovWithPartialId(someId: string): Promise<StringKey
export async function getTablePathsForLiveObjectVersions(uids: string[]): Promise<string[] | null> {
try {
const lovs = await liveObjectVersions().find({
relations: {
liveObject: true,
},
select: {
config: {
table: true,
},
},
where: {
uid: In(uids),
liveObject: {
uid: In(uids),
},
},
})
return lovs.map((lov) => lov.config.table)
Expand Down