Skip to content

Commit

Permalink
Only keep keys if value is not None (#101)
Browse files Browse the repository at this point in the history
Fixes #94
  • Loading branch information
nicobako authored Jan 10, 2022
1 parent 9186650 commit 0123216
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notion_client/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def pick(base: Dict[Any, Any], *keys: str) -> Dict[Any, Any]:
"""Return a dict composed of key value pairs for keys passed as args."""
return {key: base[key] for key in keys if key in base}
return {key: base[key] for key in keys if key in base and base[key] is not None}


def get_url(object_id: str) -> str:
Expand Down

0 comments on commit 0123216

Please sign in to comment.