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
|
begin
|
||||||
if not aValue.IsObject then
|
if not aValue.IsObject then
|
||||||
begin
|
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;
|
end;
|
||||||
|
|
||||||
if TDuckTypedList.CanBeWrappedAsList(aValue.AsObject, lWrappedList) then
|
if TDuckTypedList.CanBeWrappedAsList(aValue.AsObject, lWrappedList) then
|
||||||
|
@ -459,7 +459,11 @@ function TTProCompiledTemplate.GetDataSetFieldAsTValue(const aDataSet: TDataSet;
|
|||||||
var
|
var
|
||||||
lField: TField;
|
lField: TField;
|
||||||
begin
|
begin
|
||||||
lField := aDataSet.FieldByName(FieldName);
|
lField := aDataSet.FindField(FieldName);
|
||||||
|
if not Assigned(lField) then
|
||||||
|
begin
|
||||||
|
Exit(TValue.Empty);
|
||||||
|
end;
|
||||||
case lField.DataType of
|
case lField.DataType of
|
||||||
ftInteger, ftSmallInt, ftWord:
|
ftInteger, ftSmallInt, ftWord:
|
||||||
Result := lField.AsInteger;
|
Result := lField.AsInteger;
|
||||||
|
Loading…
Reference in New Issue
Block a user