Skip to content

Commit

Permalink
Dev: avoid double DB request for template config
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Dec 21, 2017
1 parent 5e46ec2 commit b3caf27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/models/TemplateConfiguration.php
Expand Up @@ -245,7 +245,7 @@ public static function getInstance($sTemplateName = null, $iSurveyGroupId = null

$oTemplateConfigurationModel = new TemplateConfiguration();

if ($sTemplateName != null) {
if ($sTemplateName != null && $iSurveyGroupId == null && $iSurveyId == null ) {
$oTemplateConfigurationModel = TemplateConfiguration::getInstanceFromTemplateName($sTemplateName);
}

Expand Down

0 comments on commit b3caf27

Please sign in to comment.