Skip to content

Commit

Permalink
Fix buildAlternateKeyUrl for Alternate Key that contains a lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalFlow authored Apr 6, 2023
1 parent e455db9 commit a24e7a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/WebApiClient.Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,8 @@
var key = params.alternateKey[i];
var value = key.value;

if (typeof(key.value) !== "number") {
// Numbers and lookups may not have enclosing single quotes, other types do
if (typeof(key.value) !== "number" && key.property != null && !key.property.startsWith("_") && !key.property.endsWith("_value")) {
value = "'" + key.value + "'";
}

Expand Down

0 comments on commit a24e7a9

Please sign in to comment.