Ash.Type.Tuple Enumerable not implemented
I have an attribute of type
When I create an instance of this model
I get this error
Is this expected? Am I doing something wrong?
:tuple:tuple defined like this: attribute :model, :tuple do
constraints [
fields: [
alpha: [type: :float, description: "The alpha parameter for the beta model"],
beta: [type: :float, description: "The beta parameter for the beta model"],
t: [type: :float, description: "The half life of the fact in days"],
]
]
allow_nil? false
default fn -> Katarineko.Srs.default_model(1, nil, nil) end
end attribute :model, :tuple do
constraints [
fields: [
alpha: [type: :float, description: "The alpha parameter for the beta model"],
beta: [type: :float, description: "The beta parameter for the beta model"],
t: [type: :float, description: "The half life of the fact in days"],
]
]
allow_nil? false
default fn -> Katarineko.Srs.default_model(1, nil, nil) end
endWhen I create an instance of this model
fact = Katarineko.Learning.create_factfact = Katarineko.Learning.create_factI get this error
{:error,
%Ash.Error.Unknown{
bread_crumbs: ["Error returned from: Katarineko.Learning.Fact.create"],
changeset: "#Changeset<>",
errors: [
%Ash.Error.Unknown.UnknownError{
error: "** (Protocol.UndefinedError) protocol Enumerable not implemented for type Tuple\n\nGot value:\n\n {3.0, 3.0, 1.0}\n",
field: nil,
value: nil,
splode: Ash.Error,
bread_crumbs: ["Error returned from: Katarineko.Learning.Fact.create"],
vars: [],
path: [],
stacktrace: #Splode.Stacktrace<>,
class: :unknown
}
]
}}{:error,
%Ash.Error.Unknown{
bread_crumbs: ["Error returned from: Katarineko.Learning.Fact.create"],
changeset: "#Changeset<>",
errors: [
%Ash.Error.Unknown.UnknownError{
error: "** (Protocol.UndefinedError) protocol Enumerable not implemented for type Tuple\n\nGot value:\n\n {3.0, 3.0, 1.0}\n",
field: nil,
value: nil,
splode: Ash.Error,
bread_crumbs: ["Error returned from: Katarineko.Learning.Fact.create"],
vars: [],
path: [],
stacktrace: #Splode.Stacktrace<>,
class: :unknown
}
]
}}Is this expected? Am I doing something wrong?
