Skip to content
Merged
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
6 changes: 5 additions & 1 deletion digital_land/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ def add_severity_column(self, severity_mapping_path=None, severity_mapping=None)
self.fieldnames.append("severity")
self.fieldnames.append("description")
self.fieldnames.append("responsibility")
self.rows = merged_df.to_dict(orient="records")
# Switch Pandas NaN to None to avoid issues with JSON
self.rows = [
{k: (None if pd.isna(v) else v) for k, v in row.items()}
for row in merged_df.to_dict(orient="records")
]

def appendErrorMessage(self, mapping_path):
# Read the mapping from the JSON config file
Expand Down