def allocate_disk(self, mailbox, value): data, __ = ResourceData.get_or_create(mailbox, self.resource) data.allocated = value data.save()
def report_traffic(self, account, value): MonitorData.objects.create(monitor=FTPTrafficMonitor.get_name(), content_object=account.systemusers.get(), value=value) data, __ = ResourceData.get_or_create(account, self.resource) data.update()