Skip to content

Commit

Permalink
refactor: saveTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
llorentelemmc committed Oct 26, 2023
1 parent 24b17bc commit c3b770a
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,14 @@ private void setTemplateName() throws AMWException {
private void saveTemplate() throws AMWException {
if (relationIdForTemplate != null) {
templateEditor.saveTemplateForRelation(template, relationIdForTemplate,
resourceId != null);
} else if (resourceId == null) {
resourceId != null);
return;
}
if (resourceId == null) {
templateEditor.saveTemplateForResourceType(template, resourceTypeId, settings.isTestingMode());
} else {
templateEditor.saveTemplateForResource(template, resourceId, settings.isTestingMode());
return;
}
templateEditor.saveTemplateForResource(template, resourceId, settings.isTestingMode());
}

public boolean canModifyTemplates() {
Expand Down

0 comments on commit c3b770a

Please sign in to comment.