Merge pull request #4286 from TDT-AG/pr/20200724-luci-base

luci-base: fix widgets CBIUserSelect appending list on load
This commit is contained in:
Jo-Philipp Wich 2020-07-24 13:17:07 +02:00 committed by GitHub
commit 14535748cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -580,6 +580,8 @@ var CBIUserSelect = form.ListValue.extend({
load: function(section_id) { load: function(section_id) {
return getUsers().then(L.bind(function(users) { return getUsers().then(L.bind(function(users) {
delete this.keylist;
delete this.vallist;
for (var i = 0; i < users.length; i++) { for (var i = 0; i < users.length; i++) {
this.value(users[i]); this.value(users[i]);
} }