diff --git a/pyweb/mumble/admin.py b/pyweb/mumble/admin.py index 4843444..f66bd9e 100644 --- a/pyweb/mumble/admin.py +++ b/pyweb/mumble/admin.py @@ -67,7 +67,7 @@ class MumbleAdmin(admin.ModelAdmin): def get_port( self, obj ): if not obj.port: - return "< %d >" % (settings.MUMBLE_DEFAULT_PORT + obj.srvid - 1) + return '< %d >' % (obj.server.defaultPort + obj.srvid - 1) return obj.port get_port.short_description = _('Server Port') diff --git a/pyweb/mumble/models.py b/pyweb/mumble/models.py index 9e85c2c..06a53b6 100644 --- a/pyweb/mumble/models.py +++ b/pyweb/mumble/models.py @@ -147,7 +147,7 @@ class MumbleServer( models.Model ): def getDefaultPort( self ): """ Return the default port configured on this server. """ if "port" in self.defaultconf: - return self.defaultconf['port'] + return int(self.defaultconf['port']) else: return settings.MUMBLE_DEFAULT_PORT @@ -162,7 +162,7 @@ class MumbleServer( models.Model ): version = property( getVersion ) prettyversion = property( lambda self: '.'.join( map( str, self.version[:3] ) ), - doc="Pretty-Printed version" ); + doc="Pretty-Printed version" ) class Mumble( models.Model ):