ui: traffic-control edit: very simple duplicate timeframe detection
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
fdf9373f9e
commit
3490d9460c
@ -203,7 +203,14 @@ Ext.define('PBS.window.TrafficControlEdit', {
|
||||
delete values.timeframe;
|
||||
}
|
||||
if (values.timeframe && !Ext.isArray(values.timeframe)) {
|
||||
values.timeframe = values.timeframe.split(';');
|
||||
let timeframe = [], seen = {};
|
||||
values.timeframe.split(';').forEach(tf => {
|
||||
if (!seen[tf]) {
|
||||
timeframe.push(tf);
|
||||
seen[tf] = true;
|
||||
}
|
||||
});
|
||||
values.timeframe = timeframe;
|
||||
}
|
||||
|
||||
delete values['network-select'];
|
||||
|
Loading…
Reference in New Issue
Block a user