Compare commits

...

2 commits

Author SHA1 Message Date
69638b6b6d Release 0.14.2 2023-07-22 21:57:40 +02:00
ee561a5127 Fix division by zero 2023-07-22 21:56:53 +02:00
4 changed files with 7 additions and 2 deletions

View file

@ -1,6 +1,9 @@
Changelog Changelog
========= =========
* :release:`0.14.2 <2023-07-22>`
* :bug:`-` fix division by zero for hosting packages without disk space allocation
* :release:`0.14.1 <2023-07-22>` * :release:`0.14.1 <2023-07-22>`
* :bug:`-` fix squashed migration for disk space statistics * :bug:`-` fix squashed migration for disk space statistics

View file

@ -1,4 +1,4 @@
# import celery_app to initialize it # import celery_app to initialize it
from gnuviechadmin.celery import app as celery_app # NOQA from gnuviechadmin.celery import app as celery_app # NOQA
__version__ = "0.14.1" __version__ = "0.14.2"

View file

@ -290,6 +290,8 @@ class CustomerHostingPackage(HostingPackageBase):
used_disk_space_sum = property(get_used_disk_space_sum) used_disk_space_sum = property(get_used_disk_space_sum)
def get_space_level(self): def get_space_level(self):
if not self.diskspace:
return 100.0
return self.used_disk_space_sum / self.disk_space * 100.0 return self.used_disk_space_sum / self.disk_space * 100.0
space_level = property(get_space_level) space_level = property(get_space_level)

View file

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "gva" name = "gva"
version = "0.14.1" version = "0.14.2"
description = "gnuviechadmin web interface" description = "gnuviechadmin web interface"
authors = ["Jan Dittberner <jan@dittberner.info>"] authors = ["Jan Dittberner <jan@dittberner.info>"]
license = "AGPL-3+" license = "AGPL-3+"