svn commit: r1554290 - /ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPostalAddressTemplate.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1554290 - /ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPostalAddressTemplate.groovy

adrianc
Author: adrianc
Date: Mon Dec 30 18:15:49 2013
New Revision: 1554290

URL: http://svn.apache.org/r1554290
Log:
Fixed a bug in Party Manager where FreeMarker threw an exception when a PostalAddress did not contain a country GEO ID.

Modified:
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPostalAddressTemplate.groovy

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPostalAddressTemplate.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPostalAddressTemplate.groovy?rev=1554290&r1=1554289&r2=1554290&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPostalAddressTemplate.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPostalAddressTemplate.groovy Mon Dec 30 18:15:49 2013
@@ -23,15 +23,11 @@ postalAddressTemplateSuffix = context.po
 if (!postalAddressTemplateSuffix) {
   postalAddressTemplateSuffix = ".ftl";
 }
-
+context.postalAddressTemplate = "PostalAddress" + postalAddressTemplateSuffix;
 if (postalAddressForTemplate && postalAddressForTemplate.countryGeoId) {
     postalAddressTemplate = "PostalAddress_" + postalAddressForTemplate.countryGeoId + postalAddressTemplateSuffix;
     file = new File(addressTemplatePath + postalAddressTemplate);
     if (file.exists()) {                
         context.postalAddressTemplate = postalAddressTemplate;
-    } else {
-        context.postalAddressTemplate = "PostalAddress" + postalAddressTemplateSuffix;
     }
 }
-
-context.postalAddress = postalAddressForTemplate;