From 008f938d79330f3a078f2d3563575678e003f429 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Sat, 4 Apr 2009 16:55:12 +0200 Subject: [PATCH] changed to update only if owner and password given (cant update without owner due to email) --- pyweb/mumble/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyweb/mumble/models.py b/pyweb/mumble/models.py index d813ca9..f94fb86 100644 --- a/pyweb/mumble/models.py +++ b/pyweb/mumble/models.py @@ -147,7 +147,7 @@ class Mumble( models.Model ): class MumbleUser( models.Model ): mumbleid = models.IntegerField( 'Mumble player_id', editable = False, default = -1 ); name = models.CharField( 'User name and Login', max_length = 200 ); - password = models.CharField( 'Login password', max_length = 200 ); + password = models.CharField( 'Login password', max_length = 200, blank=True ); server = models.ForeignKey( Mumble ); owner = models.ForeignKey( User, null=True, blank=True ); isAdmin = models.BooleanField( 'Admin on root channel', default = False ); @@ -168,7 +168,7 @@ class MumbleUser( models.Model ): self.mumbleid = murmur.registerPlayer( dbus.String( self.name ) ); # Update user's registration - if self.password: + if self.password and self.owner: murmur.setRegistration( dbus.Int32( self.mumbleid ), dbus.String( self.name ),