Skip to content

Commit 43dceff

Browse files
push!(::ParTable, Tuple): check keys compat
Co-authored-by: Maximilian-Stefan-Ernst <34346372+Maximilian-Stefan-Ernst@users.noreply.github.com>
1 parent 5bb89a0 commit 43dceff

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/frontend/specification/ParameterTable.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ sort_vars(partable::ParameterTable) = sort_vars!(deepcopy(partable))
227227
# add a row --------------------------------------------------------------------------------
228228

229229
function Base.push!(partable::ParameterTable, d::Union{AbstractDict{Symbol}, NamedTuple})
230+
issetequal(keys(partable.columns), keys(d)) ||
231+
throw(ArgumentError("The new row needs to have the same keys as the columns of the parameter table."))
230232
for (key, val) in pairs(d)
231233
push!(partable.columns[key], val)
232234
end

0 commit comments

Comments
 (0)