Skip to content

Commit 3695abf

Browse files
committed
Adding error handling of defaulting to empty string in case organizationId is not available. Not expecting this state to be hit though
1 parent db347df commit 3695abf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/AnalyticsServiceCEImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public Mono<User> identifyUser(User user, UserData userData, String recentlyUsed
147147
"instanceId",
148148
instanceId,
149149
"organizationId",
150-
organizationId,
150+
ObjectUtils.defaultIfNull(organizationId, ""),
151151
"mostRecentlyUsedWorkspaceId",
152152
tuple.getT4(),
153153
"role",
@@ -348,7 +348,7 @@ public <T> Mono<T> sendObjectEvent(AnalyticsEvents event, T object, Map<String,
348348
HashMap<String, Object> analyticsProperties = new HashMap<>();
349349
analyticsProperties.put("id", id);
350350
analyticsProperties.put("oid", ((Identifiable) object).getId());
351-
analyticsProperties.put("organizationId", organizationId);
351+
analyticsProperties.put("organizationId", ObjectUtils.defaultIfNull(organizationId, ""));
352352
if (extraProperties != null) {
353353
analyticsProperties.putAll(extraProperties);
354354
// To avoid sending extra event data to analytics

0 commit comments

Comments
 (0)