Commit 0114e945 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

quotaholder: Impose non-null commission name

Default to empty string
parent 0baa611f
......@@ -133,7 +133,7 @@ def resolve_pending_serial(serial, accept=True):
return qh.resolve_pending_commission('astakos', serial, accept)
def register_pending_apps(user, quantity, force=False, name=None):
def register_pending_apps(user, quantity, force=False, name=""):
provision = (user.uuid, SYSTEM, 'astakos.pending_app'), quantity
s = qh.issue_commission(clientkey='astakos',
......
......@@ -63,7 +63,7 @@ def now():
class Commission(Model):
serial = AutoField(primary_key=True)
name = CharField(max_length=4096, null=True)
name = CharField(max_length=4096, default="")
clientkey = CharField(max_length=4096, null=False)
issue_time = CharField(max_length=24, default=now)
......@@ -97,7 +97,7 @@ class Provision(Model):
class ProvisionLog(Model):
serial = BigIntegerField()
name = CharField(max_length=4096, null=True)
name = CharField(max_length=4096)
issue_time = CharField(max_length=4096)
log_time = CharField(max_length=4096)
holder = CharField(max_length=4096)
......
......@@ -45,7 +45,7 @@ from astakos.quotaholder.exception import (
class QuotaholderTest(TestCase):
def issue_commission(self, provisions, name=None, force=False):
def issue_commission(self, provisions, name="", force=False):
return qh.issue_commission(clientkey=self.client,
name=name,
force=force,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment