bug: correct sdk handling of the zero int64 value (#18729)

* bug: correct handling of the zero int64 value

* Update changelog/18729.txt

---------

Co-authored-by: valli_0x <personallune@mail.ru>
Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
This commit is contained in:
valli_0x 2023-03-09 14:25:45 +03:00 committed by GitHub
parent d16f0ef9d2
commit 8e9680223d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

3
changelog/18729.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
sdk/backend: prevent panic when computing the zero value for a `TypeInt64` schema field.
```

View File

@ -752,6 +752,8 @@ func (t FieldType) Zero() interface{} {
return "" return ""
case TypeInt: case TypeInt:
return 0 return 0
case TypeInt64:
return int64(0)
case TypeBool: case TypeBool:
return false return false
case TypeMap: case TypeMap: