Skip to content

Commit

Permalink
pob: don't fail on missing pantheons or bandits
Browse files Browse the repository at this point in the history
  • Loading branch information
Dav1dde committed Feb 12, 2024
1 parent 5d7ed96 commit add10b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pob/src/serde/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ pub(crate) struct Build {
#[serde(rename = "$value")]
pub stats: Vec<StatType>,
pub main_socket_group: u8,
#[serde(deserialize_with = "deserialize_str_none")]
#[serde(default, deserialize_with = "deserialize_str_none")]
pub bandit: Option<Bandit>,
#[serde(deserialize_with = "deserialize_str_none")]
#[serde(default, deserialize_with = "deserialize_str_none")]
pub pantheon_major_god: Option<PantheonMajorGod>,
#[serde(deserialize_with = "deserialize_str_none")]
#[serde(default, deserialize_with = "deserialize_str_none")]
pub pantheon_minor_god: Option<PantheonMinorGod>,
}

Expand Down
2 changes: 1 addition & 1 deletion pob/test/316_empty.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<PathOfBuilding>
<Build level="1" targetVersion="3_0" pantheonMajorGod="None" bandit="None" className="Scion" ascendClassName="None" mainSocketGroup="1" viewMode="IMPORT" pantheonMinorGod="None">
<Build level="1" targetVersion="3_0" className="Scion" ascendClassName="None" mainSocketGroup="1" viewMode="IMPORT">
<PlayerStat stat="AverageDamage" value="1.8857142857143"/>
<PlayerStat stat="Speed" value="1.2"/>
<PlayerStat stat="Speed" value="1.2"/>
Expand Down

0 comments on commit add10b1

Please sign in to comment.