summaryrefslogtreecommitdiff
path: root/src/mailman/model/domain.py
diff options
context:
space:
mode:
authorAbhilash Raj2015-03-26 03:06:58 +0530
committerAbhilash Raj2015-03-26 03:06:58 +0530
commitc5b114328eac659bb0f33f9727efffea88dc3542 (patch)
tree4fbb17365ce684d663f7c239ce799a3d215bb5b2 /src/mailman/model/domain.py
parentae2a7c9a22f5b6eeed1a6884c6dcd87ed9ba673d (diff)
downloadmailman-c5b114328eac659bb0f33f9727efffea88dc3542.tar.gz
mailman-c5b114328eac659bb0f33f9727efffea88dc3542.tar.zst
mailman-c5b114328eac659bb0f33f9727efffea88dc3542.zip
Diffstat (limited to 'src/mailman/model/domain.py')
-rw-r--r--src/mailman/model/domain.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mailman/model/domain.py b/src/mailman/model/domain.py
index b6705a619..7167d211e 100644
--- a/src/mailman/model/domain.py
+++ b/src/mailman/model/domain.py
@@ -133,10 +133,10 @@ class DomainManager:
# Be sure that the owner exists
owner = None
if owner_id is not None:
- owner = store.query(User).filter(id==owner_id).first()
+ owner = store.query(User).get(owner_id)
if owner is None:
raise BadDomainSpecificationError(
- 'Owner does not exist')
+ 'Owner of this domain does not exist')
notify(DomainCreatingEvent(mail_host))
domain = Domain(mail_host, description, base_url, owner)
store.add(domain)