Commit a63f4579 authored by Alfredo Sumaran's avatar Alfredo Sumaran Committed by Jacob Schatz

Make group skip validation in the frontend

parent d4349ba6
...@@ -45,14 +45,14 @@ window.GroupsSelect = (function() { ...@@ -45,14 +45,14 @@ window.GroupsSelect = (function() {
page, page,
per_page: GroupsSelect.PER_PAGE, per_page: GroupsSelect.PER_PAGE,
all_available, all_available,
skip_groups,
}; };
}, },
results: function (data, page) { results: function (data, page) {
if (data.length) return { results: [] }; if (data.length) return { results: [] };
const results = data.length ? data : data.results || []; const groups = data.length ? data : data.results || [];
const more = data.pagination ? data.pagination.more : false; const more = data.pagination ? data.pagination.more : false;
const results = groups.filter(group => skip_groups.indexOf(group.id) === -1);
return { return {
results, results,
......
---
title: Skip groups validation on the client
merge_request:
author:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment