Skip to content

Commit

Permalink
bug: correct sdk handling of the zero int64 value (#18729)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people authored Mar 9, 2023
1 parent 75efaf0 commit 0bbeba1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog/18729.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
sdk/backend: prevent panic when computing the zero value for a `TypeInt64` schema field.
```
2 changes: 2 additions & 0 deletions sdk/framework/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,8 @@ func (t FieldType) Zero() interface{} {
return ""
case TypeInt:
return 0
case TypeInt64:
return int64(0)
case TypeBool:
return false
case TypeMap:
Expand Down

0 comments on commit 0bbeba1

Please sign in to comment.