Copy the query params so that we don't add id__in to them. This fixes a bug where a newly copied row would not show up on the list if a websocket message for an inventory source sync had come through beforehand because id__in had been added to the query params.

This commit is contained in:
mabashian 2020-09-10 16:51:46 -04:00
parent 6681ffa8df
commit 40e4ba43ef

View File

@ -72,7 +72,7 @@ function InventoryList({ i18n }) {
const fetchInventoriesById = useCallback(
async ids => {
const params = parseQueryString(QS_CONFIG, location.search);
const params = { ...parseQueryString(QS_CONFIG, location.search) };
params.id__in = ids.join(',');
const { data } = await InventoriesAPI.read(params);
return data.results;