chore(groups): Enable updating groups without roles or providers (#6498)

This commit is contained in:
Pablo Lara authored and GitHub committed 2025-01-14 11:16:13 +01:00
1 parent 1108d90768
commit a65ca72177
4 files changed
+27 -20

No files matched your search

+2 -3
View File
@@ -171,14 +171,13 @@ export const updateProviderGroup = async (
};
// Add relationships only if there are items
if (providers.length > 0) {
if (providers.length >= 0) {
payload.data.relationships!.providers = { data: providers };
}
if (roles.length > 0) {
if (roles.length >= 0) {
payload.data.relationships!.roles = { data: roles };
}
try {
const url = `${keyServer}/provider-groups/${providerGroupId}`;
const response = await fetch(url, {