934: Pass optional arguments to domain model r=mergify[bot] a=ionutfilip

## What type of PR?
bug-fix

## What does this PR do?
Passing optional args to domain model when using cli.

### Related issue(s)
Fixes #933

## Prerequistes
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [ ] Unless it's docs or a minor change: place entry in the [changelog](CHANGELOG.md), under the latest un-released version.


Co-authored-by: Ionut Filip <ionut.philip@gmail.com>
master
bors[bot] 6 years ago
commit 211136f9b1

@ -96,7 +96,8 @@ 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()

Loading…
Cancel
Save