Skip to content

Commit

Permalink
fix: ensure that enrolment CA is selected on DMS creation
Browse files Browse the repository at this point in the history
Signed-off-by: Juanjo Rodriguez <juanjo@apache.org>
  • Loading branch information
jjrodrig committed Dec 30, 2024
1 parent bc15eab commit 2719a15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/views/DMS/DMSCreateUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ export const DMSForm: React.FC<Props> = ({ dms, onSubmit, actionLabel = "Create"
}

const submit = handleSubmit(data => {
if (!data.enrollProtocol.enrollmentCA) {
enqueueSnackbar("Enrollment CA is required", { variant: "error" });
return;
}
const run = async () => {
let awsMeta = {};
if (data.awsIotIntegration.id !== "") {
Expand Down

0 comments on commit 2719a15

Please sign in to comment.