Skip to content

Commit

Permalink
fix: leave out empty organisation images when migrating
Browse files Browse the repository at this point in the history
  • Loading branch information
ewan-escience committed Jun 30, 2022
1 parent 1c595e0 commit 230ab1a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,9 @@ public static void saveOrganisationLogos(JsonArray allOrganisationsFromLegacyRSD
if (existingIds.contains(orgId)) return;

logoToSave.addProperty("organisation", orgId);
logoToSave.add("data", logo.get("data"));
String possibleImageData = stringOrNull(logo.get("data"));
if (possibleImageData == null || possibleImageData.isBlank()) return;
logoToSave.addProperty("data", possibleImageData);
logoToSave.add("mime_type", logo.get("mimeType"));
existingIds.add(orgNameToId.get(name));

Expand Down

0 comments on commit 230ab1a

Please sign in to comment.