fix users list not subtracted properly when displaying picker
[plstackapi.git] / planetstack / core / xoslib / static / js / xosTenant.js
index 929552c..96465d3 100644 (file)
@@ -264,6 +264,8 @@ XOSTenantApp.viewSlice = function(model) {
         tenantSites = new XOSTenantSiteCollection();\r
         tenantSites.getFromSlice(model);\r
         model.usersBuffer = model.attributes.users; /* save a copy of 'users' that we can edit. This prevents another view (developer) from overwriting our copy with a fetch from the server */\r
+        model.usersOrig = model.attributes.users;   /* save an immutable copy that we'll use for username lookups */\r
+        model.user_namesOrig = model.attributes.user_names;\r
         model.tenantSiteCollection = tenantSites;\r
         XOSTenantApp.tenantSites = tenantSites;\r
 \r