Skip to content

Commit dde2e65

Browse files
claudiamurialdoBeta Bot
authored and
Beta Bot
committed
Cherry pick branch 'genexuslabs:fix/rest-context-timezone' into beta
1 parent 420774d commit dde2e65

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

dotnet/src/dotnetframework/GxClasses/Domain/GxCollections.cs

+13-3
Original file line numberDiff line numberDiff line change
@@ -787,10 +787,20 @@ public virtual void FromJSONObject(dynamic obj)
787787
public GxSimpleCollection<string> ToStringCollection(int digits, int decimals)
788788
{
789789
GxSimpleCollection<string> result = new GxSimpleCollection<string>();
790-
foreach (T item in this)
790+
if (typeof(T) == typeof(string))
791+
{
792+
foreach (T item in this)
793+
{
794+
result.Add(item as string);
795+
}
796+
}
797+
else
791798
{
792-
decimal value = (decimal)Convert.ChangeType(item, typeof(decimal));
793-
result.Add(StringUtil.LTrim(StringUtil.Str(value, digits, decimals)));
799+
foreach (T item in this)
800+
{
801+
decimal value = (decimal)Convert.ChangeType(item, typeof(decimal));
802+
result.Add(StringUtil.LTrim(StringUtil.Str(value, digits, decimals)));
803+
}
794804
}
795805
return result;
796806
}

0 commit comments

Comments
 (0)