Merge pull request #74 from TouchInstinct/fix/bugs
Fixed copyWithout method and decimal encoding
This commit is contained in:
commit
1816c2e4b1
|
|
@ -1,9 +1,13 @@
|
|||
{%- import '../../macroses/common.utils.twig' as utils -%}
|
||||
|
||||
{%- if fields is not empty -%}
|
||||
{%- set nullableOptionalFields = [] -%}
|
||||
{%- for field in fields -%}
|
||||
{%- if field.nullable or field.optional -%}
|
||||
{{ field.name }}: Bool = false{%- if not (loop.last) %}, {% endif %}
|
||||
{%- set nullableOptionalFields = nullableOptionalFields|merge([field]) -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- for field in nullableOptionalFields -%}
|
||||
{{ field.name }}: Bool = false{%- if not (loop.last) %}, {% endif %}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
{%- elseif field.type.type.baseTypeName == "StringDecimal" -%}
|
||||
{{- self.formatEncodingStringDecimal(field) -}}
|
||||
{%- elseif field.type.type.baseTypeName == "Decimal" -%}
|
||||
{{ self.formatFieldName(field.name, isStrongLinkCaptured) -}}.decimalValue
|
||||
{{ self.formatFieldName(field, isStrongLinkCaptured) -}}.decimalValue
|
||||
{%- elseif field.type.type.baseTypeName == "DateTimeTimestamp" -%}
|
||||
Int({{ self.formatFieldName(field, isStrongLinkCaptured) -}}.timeIntervalSince1970)
|
||||
{%- elseif field.type.type.baseTypeName == "Color" -%}
|
||||
|
|
|
|||
Loading…
Reference in New Issue