Skip to content

Commit

Permalink
Fix None check in update_chart to work with DataFrames
Browse files Browse the repository at this point in the history
What we have now will fail if you submit a DataFrame, saying:


ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
  • Loading branch information
palewire authored May 16, 2024
1 parent 066ffdc commit 10cf591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datawrapper/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ def update_chart(
obj = self.get_chart(chart_id)

# Add data, if provided
if data:
if data is not None:
self.add_data(chart_id=obj["id"], data=data)

# Return the result
Expand Down

0 comments on commit 10cf591

Please sign in to comment.