Skip to content

Commit

Permalink
fix a bug reported by Hani Hankir in OFBIZ-8097
Browse files Browse the repository at this point in the history
This is a bug in which createTenant crashes due to groovy gstring
evaluation where a string is needed. The fix is simple by removing
gstring and passing variables directly.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758662 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
pythys committed Aug 31, 2016
1 parent 4248793 commit 3a14ce8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,11 @@ task createTenant(group: ofbizServer, description: 'Create a new tenant in your

task generateDatabaseTemplateFile(dependsOn: prepareAndValidateTenantArguments) << {
def filterTokens = ['tenantId': tenantId,
'tenantName': project.hasProperty('tenantName')? "${tenantName}":tenantId,
'domainName': project.hasProperty('domainName')? "${domainName}":'org.apache.ofbiz',
'db-IP': project.hasProperty('dbIp')? "${dbIp}":'',
'db-User': project.hasProperty('dbUser')? "${dbUser}":'',
'db-Password': project.hasProperty('dbPassword')? "${dbPassword}":'']
'tenantName': project.hasProperty('tenantName')? tenantName : tenantId,
'domainName': project.hasProperty('domainName')? domainName : 'org.apache.ofbiz',
'db-IP': project.hasProperty('dbIp')? dbIp : '',
'db-User': project.hasProperty('dbUser')? dbUser : '',
'db-Password': project.hasProperty('dbPassword')? dbPassword : '']

generateFileFromTemplate(databaseTemplateFile, 'runtime/tmp',
filterTokens, 'tmpFilteredTenantData.xml')
Expand Down

0 comments on commit 3a14ce8

Please sign in to comment.