Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
- Fixed `PhaseDiagram.binary_vle()` panicking during search for VLLE (tried to access unallocated element). [#361] (https://github.com/feos-org/feos/pull/362)
- Fixed reading binary association parameters from JSON. [#363](https://github.com/feos-org/feos/pull/363)

## [0.9.5] - 2026-04-14
### Added
Expand Down
11 changes: 7 additions & 4 deletions py-feos/src/parameter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ impl PyParameters {
.map(|r| {
// Explicitly parse model record
// Needed for returning error if parsing fails instead of returning None
let model_record = match r.model_record {
Some(v) => Some(serde_json::from_value::<B>(v)?),
None => None,
};
let model_record = r
.model_record
// A missing BIP is parsed as Some(Object {}) rather than None, so this case has
// to be handled explicitly
.filter(|v| !matches!(v.as_object(), Some(o) if o.is_empty()))
.map(serde_json::from_value::<B>)
.transpose()?;

let association_sites = r
.association_sites
Expand Down
Loading