Notification fix (#12744) (#12745)

* Fill out stock location based on part default

* [UI] Bug fix for notifications

- Closes https://github.com/inventree/InvenTree/issues/12706

(cherry picked from commit c821fa0f43)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot]
2026-08-30 18:42:30 +10:00
committed by GitHub
co-authored by Oliver
parent fa6b9e4349
commit 2fbaa02a07
@@ -52,8 +52,8 @@ function NotificationEntry({
const model_type = notification.target?.model_type; const model_type = notification.target?.model_type;
const model_id = notification.target?.model_id; const model_id = notification.target?.model_id;
// If a valid model type is provided, that overrides the specified link // If a valid model type is provided, and no explicit link, construct a link
if (model_type as ModelType) { if (!link && (model_type as ModelType)) {
const model_info = ModelInformationDict[model_type as ModelType]; const model_info = ModelInformationDict[model_type as ModelType];
if (model_info?.url_detail && model_id) { if (model_info?.url_detail && model_id) {
link = getDetailUrl(model_type as ModelType, model_id); link = getDetailUrl(model_type as ModelType, model_id);