From 8ff487cb988b00c7e872b94061845ad7a429baad Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Fri, 25 Jul 2025 14:22:25 -0700 Subject: [PATCH] No need to use the ExpData to look itself up --- flow/src/org/labkey/flow/persist/AttributeSetHelper.java | 6 +++--- flow/src/org/labkey/flow/persist/FlowManager.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flow/src/org/labkey/flow/persist/AttributeSetHelper.java b/flow/src/org/labkey/flow/persist/AttributeSetHelper.java index 6a5597c76..78e0b06b2 100644 --- a/flow/src/org/labkey/flow/persist/AttributeSetHelper.java +++ b/flow/src/org/labkey/flow/persist/AttributeSetHelper.java @@ -153,7 +153,7 @@ public static void doSave(AttributeSet attrs, User user, ExpData data, @Nullable List> paramsList = new ArrayList<>(); for (Map.Entry entry : keywords.entrySet()) { - AttributeCache.Entry a = AttributeCache.KEYWORDS.byAttribute(c, entry.getKey()); + AttributeCache.Entry a = AttributeCache.KEYWORDS.byAttribute(c, entry.getKey()); assert a != null : "parepareForSave should have created an entry"; int preferredId = a.getAliasedId() == null ? a.getRowId() : a.getAliasedId(); int originalId = a.getRowId(); @@ -174,7 +174,7 @@ public static void doSave(AttributeSet attrs, User user, ExpData data, @Nullable List> paramsList = new ArrayList<>(); for (Map.Entry entry : statistics.entrySet()) { - AttributeCache.Entry a = AttributeCache.STATS.byAttribute(c, entry.getKey()); + AttributeCache.Entry a = AttributeCache.STATS.byAttribute(c, entry.getKey()); assert a != null : "parepareForSave should have created an entry"; int preferredId = a.getAliasedId() == null ? a.getRowId() : a.getAliasedId(); int originalId = a.getRowId(); @@ -213,7 +213,7 @@ public static void doSave(AttributeSet attrs, User user, ExpData data, @Nullable List> paramsList = new ArrayList<>(); for (Map.Entry entry : graphs.entrySet()) { - AttributeCache.Entry a = AttributeCache.GRAPHS.byAttribute(c, entry.getKey()); + AttributeCache.Entry a = AttributeCache.GRAPHS.byAttribute(c, entry.getKey()); assert a != null : "parepareForSave should have created an entry"; int preferredId = a.getAliasedId() == null ? a.getRowId() : a.getAliasedId(); int originalId = a.getRowId(); diff --git a/flow/src/org/labkey/flow/persist/FlowManager.java b/flow/src/org/labkey/flow/persist/FlowManager.java index 6e43a7737..d1d8800be 100644 --- a/flow/src/org/labkey/flow/persist/FlowManager.java +++ b/flow/src/org/labkey/flow/persist/FlowManager.java @@ -1029,9 +1029,9 @@ public void flowObjectModified() } - public AttrObject createAttrObject(ExpData data, ObjectType type, URI uri) + public AttrObject createAttrObject(@NotNull ExpData data, ObjectType type, URI uri) { - if (FlowDataHandler.instance.getPriority(ExperimentService.get().getExpData(data.getRowId())) != Handler.Priority.HIGH) + if (FlowDataHandler.instance.getPriority(data) != Handler.Priority.HIGH) { // Need to make sure the right ExperimentDataHandler is associated with this data file, otherwise, you // won't be able to delete it because of the foreign key constraint from the flow.object table.