Fix certificates getting null domain names whgen no cn exists

This commit is contained in:
Jamie Curnow committed 2026-05-18 15:21:55 +10:00
1 parent 1e22574000
commit 84886383a7
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -614,7 +614,7 @@ const internalCertificate = {
const certificate = await internalCertificate.update(access, {
id: data.id,
expires_on: moment(validations.certificate.dates.to, "X").format("YYYY-MM-DD HH:mm:ss"),
domain_names: [validations.certificate.cn],
domain_names: validations.certificate.cn ? [validations.certificate.cn] : [],
meta: _.clone(row.meta), // Prevent the update method from changing this value that we'll use later
});
+1 -1
View File
@@ -18,7 +18,7 @@ const boolFields = ["is_deleted"];
const cleanDomainNames = (domainNames) => {
// Sort domain_names
if (typeof domainNames !== "undefined") {
const newDomainNames = domainNames.filter((name) => name !== null);
const newDomainNames = domainNames.filter((name) => name != null);
newDomainNames.sort();
return newDomainNames;
}