Browse Source

* Fix from Wagner Landgraf: Lookup must return Null if not found

michael 5 years ago
parent
commit
ec3efe0ad5
1 changed files with 1 additions and 2 deletions
  1. 1 2
      packages/fcl-db/jsondataset.pas

+ 1 - 2
packages/fcl-db/jsondataset.pas

@@ -1839,8 +1839,7 @@ begin
     GetFieldList(L,ResultFields);
     GetFieldList(L,ResultFields);
     Result:=inherited Lookup(KeyFields, KeyValues, ResultFields);
     Result:=inherited Lookup(KeyFields, KeyValues, ResultFields);
     RI:=LocateRecordIndex(KeyFields,KeyValues,[]);
     RI:=LocateRecordIndex(KeyFields,KeyValues,[]);
-    Result:=RI<>-1;
-    if Result then
+    if RI<>-1 then
       begin
       begin
       SetLength(Vals,L.Count);
       SetLength(Vals,L.Count);
       For I:=0 to L.Count-1 do
       For I:=0 to L.Count-1 do