Skip to content
Open
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
8 changes: 7 additions & 1 deletion src/main/java/org/ecocean/identity/IBEISIA.java
Original file line number Diff line number Diff line change
Expand Up @@ -2613,10 +2613,16 @@ public static JSONObject assignFromIAAPI(JSONObject arg, Shepherd myShepherd, bo
res = assignFromIA(indivId, al, myShepherd);
}
rtn.put("success", true);
// GH-1514: id to queue for post-commit deep reindex below. When a new
// individual was created, indivId is a *name*, not the generated
// individualID, and would silently fail to resolve in
// queueIndividualsByIdForDeepReindex.
String reindexIndividualId = indivId;
if (res.get("newMarkedIndividual") != null) {
MarkedIndividual ind = (MarkedIndividual)res.get("newMarkedIndividual");
myShepherd.getPM().makePersistent(ind);
rtn.put("newMarkedIndividual", ind.getIndividualID());
reindexIndividualId = ind.getIndividualID();
}
if (res.get("encounters") != null) {
JSONArray je = new JSONArray();
Expand All @@ -2639,7 +2645,7 @@ public static JSONObject assignFromIAAPI(JSONObject arg, Shepherd myShepherd, bo
// GH-1514: post-commit, queue deep reindex of the target individual so
// sibling encounters pick up refreshed individualNumberEncounters etc.
org.ecocean.IndexingManager.queueIndividualsByIdForDeepReindex(myShepherd,
java.util.Collections.singleton(indivId));
java.util.Collections.singleton(reindexIndividualId));
return rtn;
}

Expand Down
Loading