From 35c72922fea03d21aac01d9022a67d13d64928ec Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Thu, 9 Apr 2009 14:22:31 +0200 Subject: [PATCH] updated to use a default email address from settings when owner is None --- pyweb/mumble/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyweb/mumble/models.py b/pyweb/mumble/models.py index f94fb86..58394c8 100644 --- a/pyweb/mumble/models.py +++ b/pyweb/mumble/models.py @@ -35,6 +35,8 @@ from django.db import models from mmobjects import mmServer, mmACL +from pyweb.settings import DEFAULT_FROM_EMAIL + import dbus import socket @@ -168,11 +170,11 @@ class MumbleUser( models.Model ): self.mumbleid = murmur.registerPlayer( dbus.String( self.name ) ); # Update user's registration - if self.password and self.owner: + if self.password: murmur.setRegistration( dbus.Int32( self.mumbleid ), dbus.String( self.name ), - dbus.String( self.owner.email ), + dbus.String( self.owner.email if self.owner else DEFAULT_FROM_EMAIL ), dbus.String( self.password ) );