Commit 0a0c4ae
authored
fix: check vardef.regions instead of vardef in transfer_variables_or_parameters! (#213)
`!isnothing(vardef)` trivially always true; should be `!isnothing(vardef.regions)`.
When a variable has `regions = nothing` (single-region model default), the old
condition entered the branch and called `empty!(nothing)`, crashing with a
MethodError. This blocked the `setup_reservoir_model(reservoir, template; wells=...)`
overload from working on any standard single-region model.1 parent 86b178a commit 0a0c4ae
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2798 | 2798 | | |
2799 | 2799 | | |
2800 | 2800 | | |
2801 | | - | |
| 2801 | + | |
2802 | 2802 | | |
2803 | 2803 | | |
2804 | 2804 | | |
| |||
0 commit comments