mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 07:45:54 +01:00
This commit is contained in:
parent
8503c77b41
commit
2e706f483f
@ -96,7 +96,11 @@ var
|
||||
begin
|
||||
if not aValue.IsObject then
|
||||
begin
|
||||
Result := '(Error: Cannot serialize non-object as JSON)';
|
||||
if aValue.IsType<Int64> then
|
||||
begin
|
||||
Exit(aValue.AsInt64);
|
||||
end;
|
||||
Exit('(Error: Cannot serialize non-object as JSON)');
|
||||
end;
|
||||
|
||||
if TDuckTypedList.CanBeWrappedAsList(aValue.AsObject, lWrappedList) then
|
||||
|
@ -459,7 +459,11 @@ function TTProCompiledTemplate.GetDataSetFieldAsTValue(const aDataSet: TDataSet;
|
||||
var
|
||||
lField: TField;
|
||||
begin
|
||||
lField := aDataSet.FieldByName(FieldName);
|
||||
lField := aDataSet.FindField(FieldName);
|
||||
if not Assigned(lField) then
|
||||
begin
|
||||
Exit(TValue.Empty);
|
||||
end;
|
||||
case lField.DataType of
|
||||
ftInteger, ftSmallInt, ftWord:
|
||||
Result := lField.AsInteger;
|
||||
|
Loading…
Reference in New Issue
Block a user