Skip to content

Commit 5c1548b

Browse files
committed
Fix sharepoint null reference
Sharepoint repo will throw exception if value is null
1 parent 3410b5f commit 5c1548b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Src/LookupUtility/Repository/SharepointLookupRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public Dictionary<string, string> LoadList(string list)
3737
item.FieldValues.TryGetValue("Key", out object keyName);
3838
item.FieldValues.TryGetValue("Value", out object valueName);
3939

40-
dictionary.Add(keyName.ToString(), valueName.ToString());
40+
dictionary.Add(keyName.ToString(), valueName as string);
4141
}
4242

4343
return dictionary;

0 commit comments

Comments
 (0)