fix(models): null value checking

This commit is contained in:
283375 2023-10-21 19:03:21 +08:00
parent a9f8ba6e22
commit 7a64ec4a4a
Signed by: 283375
SSH Key Fingerprint: SHA256:UcX0qg6ZOSDOeieKPGokA5h7soykG61nz2uxuQgVLSk

View File

@ -80,7 +80,12 @@ class ScoreCalculated(ScoresViewBase):
(
case(
(
(ChartInfo.notes.isnot(None) & ChartInfo.notes != 0),
(
ChartInfo.notes.is_not(None)
& Score.pure.is_not(None)
& Score.far.is_not(None)
& (ChartInfo.notes != 0)
),
Score.score
- func.floor(
(Score.pure * 10000000.0 / ChartInfo.notes)