diff --git a/README.md b/README.md index dbfd6c6..a0c6e14 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ The following changes are already implemented: * [Put the version into manifest.json](https://github.com/Awesome-Technologies/synapse-admin/issues/507) (CI only) * [Federation page improvements](https://github.com/Awesome-Technologies/synapse-admin/pull/583) (using theme colors) * [Add UI option to block deleted rooms from being rejoined](https://github.com/etkecc/synapse-admin/pull/26) +* [Fix required fields check on Bulk registration CSV upload](https://github.com/etkecc/synapse-admin/pull/32) _the list will be updated as new changes are added_ diff --git a/src/components/ImportFeature.tsx b/src/components/ImportFeature.tsx index 062af3d..ebd9b0f 100644 --- a/src/components/ImportFeature.tsx +++ b/src/components/ImportFeature.tsx @@ -121,7 +121,11 @@ const FilePicker = () => { const verifyCsv = ({ data, meta, errors }: ParseResult, { setValues, setStats, setError }) => { /* First, verify the presence of required fields */ - const missingFields = expectedFields.filter(eF => meta.fields?.find(mF => eF === mF)); + const missingFields = expectedFields.filter(eF => { + const result = meta.fields?.find(mF => eF === mF); + if (result === undefined) { return eF; } // missing field + return undefined; // field found + }); if (missingFields.length > 0) { setError(translate("import_users.error.required_field", { field: missingFields[0] }));