Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akiyatomohiro committed May 16, 2024
1 parent c5d951f commit 9d39a4f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 5 additions & 4 deletions server/internal/usecase/interactor/property.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,11 @@ func convertPropertyFromRedis(p PropertyForRedis) (*property.Property, error) {
property.NewValue(valueDomain),
)

fieldDomain := property.NewField(property.FieldID(field.Field)).
Value(optionalValueDomain).
Links(nil).
MustBuild()
fieldDomain := property.NewFieldDomain(
property.FieldID(field.Field),
nil,
optionalValueDomain,
)

fieldsDomain = append(fieldsDomain, fieldDomain)
}
Expand Down
8 changes: 8 additions & 0 deletions server/pkg/property/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ type Field struct {
v *OptionalValue
}

func NewFieldDomain(field FieldID, links *Links, v *OptionalValue) *Field {
return &Field{
field: field,
links: links,
v: v,
}
}

func (p *Field) Clone() *Field {
if p == nil {
return nil
Expand Down

0 comments on commit 9d39a4f

Please sign in to comment.