|
|
@ -94,7 +94,8 @@ def user(localpart, domain_name, password, hash_scheme=None):
|
|
|
|
def domain(domain_name, max_users=-1, max_aliases=-1, max_quota_bytes=0):
|
|
|
|
def domain(domain_name, max_users=-1, max_aliases=-1, max_quota_bytes=0):
|
|
|
|
domain = models.Domain.query.get(domain_name)
|
|
|
|
domain = models.Domain.query.get(domain_name)
|
|
|
|
if not domain:
|
|
|
|
if not domain:
|
|
|
|
domain = models.Domain(name=domain_name)
|
|
|
|
domain = models.Domain(name=domain_name, max_users=max_users,
|
|
|
|
|
|
|
|
max_aliases=max_aliases, max_quota_bytes=max_quota_bytes)
|
|
|
|
db.session.add(domain)
|
|
|
|
db.session.add(domain)
|
|
|
|
db.session.commit()
|
|
|
|
db.session.commit()
|
|
|
|
|
|
|
|
|
|
|
|