Only clean domain names on cert save if given
This commit is contained in:
@@ -36,7 +36,9 @@ class Certificate extends Model {
|
||||
}
|
||||
|
||||
// Default for domain_names
|
||||
this.domain_names = cleanDomainNames(this.domain_names);
|
||||
if (typeof this.domain_names !== "undefined") {
|
||||
this.domain_names = cleanDomainNames(this.domain_names);
|
||||
}
|
||||
|
||||
// Default for meta
|
||||
if (typeof this.meta === "undefined") {
|
||||
@@ -46,7 +48,9 @@ class Certificate extends Model {
|
||||
|
||||
$beforeUpdate() {
|
||||
this.modified_on = now();
|
||||
this.domain_names = cleanDomainNames(this.domain_names);
|
||||
if (typeof this.domain_names !== "undefined") {
|
||||
this.domain_names = cleanDomainNames(this.domain_names);
|
||||
}
|
||||
}
|
||||
|
||||
$parseDatabaseJson(json) {
|
||||
|
||||
Reference in New Issue
Block a user