Skip to content

Commit 9a91109

Browse files
committed
specify exceptions
1 parent 8248493 commit 9a91109

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dashboards/component/stat/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __post_init__(self):
3030
else:
3131
try:
3232
self.change = (self.value - self.previous) / self.previous * 100
33-
except: # noqa
33+
except (TypeError, ZeroDivisionError):
3434
self.change = None
3535

3636

0 commit comments

Comments
 (0)