Skip to content

Commit 5233016

Browse files
committed
Merge pull request #26 from Leanplum/feature/fix-LP-3626
fix(user attributes): LP-3626 - fix for setting a user attribute to …
1 parent e2dab77 commit 5233016

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

AndroidSDK/src/com/leanplum/internal/LeanplumInternal.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -535,10 +535,6 @@ public static <T> Map<String, T> validateAttributes(Map<String, T> attributes, S
535535
for (Map.Entry<String, T> entry : attributes.entrySet()) {
536536
T value = entry.getValue();
537537

538-
if (value == null) {
539-
continue;
540-
}
541-
542538
// Validate lists.
543539
if (allowLists && value instanceof Iterable<?>) {
544540
boolean valid = true;
@@ -559,7 +555,7 @@ public static <T> Map<String, T> validateAttributes(Map<String, T> attributes, S
559555
Date date = CollectionUtil.uncheckedCast(value);
560556
value = CollectionUtil.uncheckedCast(date.getTime());
561557
}
562-
if (!isValidScalarValue(value, argName)) {
558+
if (value != null && !isValidScalarValue(value, argName)) {
563559
continue;
564560
}
565561
}

0 commit comments

Comments
 (0)