fix: empty signature added after every certificate saving (#30912)
A new behaviour: - Empty signature is still added when initially create a certificate; - Empty signature isn't added when certificate has at least one signature.
This commit is contained in:
@@ -43,7 +43,7 @@ define([
|
||||
initialize: function(attributes, options) {
|
||||
// Set up the initial state of the attributes set for this model instance
|
||||
this.canBeEmpty = options && options.canBeEmpty;
|
||||
if (options.add) {
|
||||
if (options.add && !attributes.signatories) {
|
||||
// Ensure at least one child Signatory model is defined for any new Certificate model
|
||||
attributes.signatories = new SignatoryModel({certificate: this});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user