Skip to content

Commit

Permalink
Fix slight bug in dealing with nested optionals
Browse files Browse the repository at this point in the history
  • Loading branch information
magbak committed Jan 24, 2024
1 parent 81432d1 commit 8dba22d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion maplib/src/mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,9 @@ fn create_remapped(
.iter()
.find(|x| x.stottr_variable.name == v.name)
{
if calling_formal_arg.optional {
if target.optional {
continue;
} else if calling_formal_arg.optional {
return Ok(None);
}
}
Expand Down
2 changes: 1 addition & 1 deletion py_maplib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ fn _maplib(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
Ok(())
}

fn fix_multicolumns(mut df: DataFrame, dts: &HashMap<String, RDFNodeType>) -> DataFrame {
fn fix_multicolumns(df: DataFrame, dts: &HashMap<String, RDFNodeType>) -> DataFrame {
let mut lf = df.lazy();
for (c, v) in dts {
if v == &RDFNodeType::MultiType {
Expand Down

0 comments on commit 8dba22d

Please sign in to comment.