Add inactive item fallback for dashboard change feed lookups
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -165,7 +165,18 @@ export function dashboardPageData(store) {
|
||||
|
||||
if (missingItemUuids.length) {
|
||||
const results = await Promise.allSettled(
|
||||
missingItemUuids.map((uuid) => getStockEntry(store, uuid)),
|
||||
missingItemUuids.map(async (uuid) => {
|
||||
try {
|
||||
return await getStockEntry(store, uuid);
|
||||
} catch (error) {
|
||||
const status = error?.status || error?.cause?.status;
|
||||
if (status !== 404) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
return getStockEntry(store, uuid, { allowInactive: true });
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
||||
results.forEach((result) => {
|
||||
|
||||
Reference in New Issue
Block a user