Browse Source

include the server ID in the update() call

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
b6f829d939
  1. 3
      htdocs/js/usereditor.js
  2. 3
      pyweb/mumble/views.py

3
htdocs/js/usereditor.js

@ -100,6 +100,7 @@ Ext.ux.UserEditorPanel = function( config ){
}
}, {
text: gettext("Save"),
scope: this,
handler : function(){
var data = [];
for( i = 0; i < userAdminStore.data.items.length; i++ ){
@ -108,7 +109,7 @@ Ext.ux.UserEditorPanel = function( config ){
data.push(rec.data);
}
}
MumbleUserAdmin.update( data, function(provider, response){
MumbleUserAdmin.update( this.server, data, function(provider, response){
if( response.result.success ){
for( i = 0; i < userAdminStore.data.items.length; i++ ){
rec = userAdminStore.data.items[i];

3
pyweb/mumble/views.py

@ -261,7 +261,8 @@ def djangousers( request ):
return users
@EXT_DIRECT_PROVIDER.register_method( "MumbleUserAdmin" )
def update( request, data ):
def update( request, server, data ):
srv = get_object_or_404( Mumble, id=int(server) )
for record in data:
if record['id'] == -1:
if record['delete']:

Loading…
Cancel
Save