Skip to content

Commit

Permalink
Fix null job rate in importing Salmonia3+ backup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhxie committed May 31, 2024
1 parent 782d568 commit 21cbaae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tools/convert_salmonia3+_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@ def main():
),
"jobPoint": result["kumaPoint"],
"jobScore": result["jobScore"],
"jobRate": float(result["jobRate"]),
"jobRate": (
float(result["jobRate"])
if result["jobRate"] != None
else None
),
"jobBonus": result["jobBonus"],
"nextHistoryDetail": None,
"previousHistoryDetail": None,
Expand Down
2 changes: 1 addition & 1 deletion views/ImportView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ const ImportView = (props: ImportViewProps) => {
: null,
jobPoint: result["kumaPoint"],
jobScore: result["jobScore"],
jobRate: parseFloat(result["jobRate"]),
jobRate: result["jobRate"] === null ? null : parseFloat(result["jobRate"]),
jobBonus: result["jobBonus"],
nextHistoryDetail: null,
previousHistoryDetail: null,
Expand Down

0 comments on commit 21cbaae

Please sign in to comment.