Skip to content

Commit

Permalink
First check whether key is available
Browse files Browse the repository at this point in the history
  • Loading branch information
GenieTim committed Feb 12, 2024
1 parent 3158bf9 commit 3cd938b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public ArrayList<JSONObject> uploadImagesForSpecimen(Specimen specimen, JSONObje
for (ICImage image : specimen.getICImages()) {
// first, filter whether this particular image is already online, part of this specimen
boolean foundExisting = false;
if (existingExport != null) {
if (existingExport != null && existingExport.getJSONObject("entomologie").has("_reverse_nested:entomologie_mediaassetpublic:entomologie")) {
// check if the image has already been uploaded
JSONArray mediaassets = existingExport.getJSONObject("entomologie").getJSONArray("_reverse_nested:entomologie_mediaassetpublic:entomologie");
for (int i = 0; i < mediaassets.length(); ++i) {
Expand Down

0 comments on commit 3cd938b

Please sign in to comment.