fix issue with mailbox count calculation

- use 0 if no mailbox option is assigned to the hosting package
This commit is contained in:
Jan Dittberner 2015-01-20 00:49:19 +01:00
parent f211b535cf
commit 9890248e80

View file

@ -255,7 +255,7 @@ class CustomerHostingPackage(HostingPackageBase):
).aggregate(
mailbox_sum=models.Sum('number')
)
return self.mailboxcount + result['mailbox_sum']
return self.mailboxcount + (result['mailbox_sum'] or 0)
def get_databases(self):
"""