We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c2bd391 + 1af9bf5 commit 7ce03e2Copy full SHA for 7ce03e2
code/go/0chain.net/blobbercore/reference/ref.go
@@ -97,7 +97,9 @@ func (ref *Ref) BeforeCreate(tx *gorm.DB) (err error) {
97
if !(ref.CreatedAt > 0) {
98
return fmt.Errorf("invalid timestamp value while creating for path %s", ref.Path)
99
}
100
- ref.UpdatedAt = ref.CreatedAt
+ if ref.UpdatedAt == 0 {
101
+ ref.UpdatedAt = ref.CreatedAt
102
+ }
103
return nil
104
105
0 commit comments