Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
yk-eukarya committed Oct 24, 2024
1 parent b85ef41 commit b008239
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions server/internal/adapter/gql/gqlmodel/convert_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ func ToSchemaFieldTypeProperty(tp *schema.TypeProperty, dv *value.Multiple, mult
v, _ = dv.First().ValueNumber()
}
}
res = &SchemaFieldInteger{
res = &SchemaFieldNumber{
DefaultValue: v,
Min: util.ToPtrIfNotEmpty(int(lo.FromPtr(f.Min()))),
Max: util.ToPtrIfNotEmpty(int(lo.FromPtr(f.Max()))),
Min: util.ToPtrIfNotEmpty(float64(lo.FromPtr(f.Min()))),
Max: util.ToPtrIfNotEmpty(float64(lo.FromPtr(f.Max()))),
}
},
Integer: func(f *schema.FieldInteger) {
Expand Down
4 changes: 3 additions & 1 deletion server/internal/adapter/gql/gqlmodel/convert_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func ToValueType(t value.Type) SchemaFieldType {
case value.TypeSelect:
return SchemaFieldTypeSelect
case value.TypeNumber:
return SchemaFieldTypeInteger
return SchemaFieldTypeNumber
case value.TypeInteger:
return SchemaFieldTypeInteger
case value.TypeReference:
Expand Down Expand Up @@ -69,6 +69,8 @@ func FromValueType(t SchemaFieldType) value.Type {
return value.TypeCheckbox
case SchemaFieldTypeInteger:
return value.TypeInteger
case SchemaFieldTypeNumber:
return value.TypeNumber
case SchemaFieldTypeReference:
return value.TypeReference
case SchemaFieldTypeURL:
Expand Down

0 comments on commit b008239

Please sign in to comment.