mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-27 16:37:55 +01:00
Fix certificates getting null domain names whgen no cn exists
This commit is contained in:
1 parent
1e22574000
commit
84886383a7
2 files changed
+2
-2
No files matched your search
@@ -614,7 +614,7 @@ const internalCertificate = {
|
|||||||
const certificate = await internalCertificate.update(access, {
|
const certificate = await internalCertificate.update(access, {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
expires_on: moment(validations.certificate.dates.to, "X").format("YYYY-MM-DD HH:mm:ss"),
|
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
|
meta: _.clone(row.meta), // Prevent the update method from changing this value that we'll use later
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const boolFields = ["is_deleted"];
|
|||||||
const cleanDomainNames = (domainNames) => {
|
const cleanDomainNames = (domainNames) => {
|
||||||
// Sort domain_names
|
// Sort domain_names
|
||||||
if (typeof domainNames !== "undefined") {
|
if (typeof domainNames !== "undefined") {
|
||||||
const newDomainNames = domainNames.filter((name) => name !== null);
|
const newDomainNames = domainNames.filter((name) => name != null);
|
||||||
newDomainNames.sort();
|
newDomainNames.sort();
|
||||||
return newDomainNames;
|
return newDomainNames;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user