75bb67c2 by acetousk

Bug fix: force#DiskToDbResourceAndPublish

1 parent ba1567f1
......@@ -683,10 +683,15 @@ Find the email templates in the productStore, for each email template in the pro
<set field="dbResourceToUpdateText" from="dbResourceToUpdate.getText()"/>
<set field="childText" from="child.getText()"/>
<set field="updatedText" from="false"/>
<if condition="dbResourceToUpdateText != childText"><then>
<script><![CDATA[
dbResourceToUpdate.putText(childText)
updatedText = true
]]></script>
</then><else>
</else></if>
<set field="versionName" from="dbResourceToUpdate.getCurrentVersion()?.getVersionName()"/>
<if condition="!versionName">
<log level="warn" message="No version name found for dbresource ${dbResourceToUpdate.location}"/>
......@@ -708,26 +713,21 @@ Find the email templates in the productStore, for each email template in the pro
<iterate list="emailTemplateList" entry="emailTemplate">
<set field="logText" value="At emailTemplate ${emailTemplate.emailTemplateId},"/>
<if condition="emailTemplate.grapesLocation == dbResourceToUpdate.location">
<if condition="emailTemplate.grapesLocation == dbResourceToUpdate.location &amp;&amp; emailTemplate.grapesPublishedVersionName != versionName">
<set field="emailTemplate.grapesPublishedVersionName" from="versionName"/>
<set field="updatedEmailTemplateList" from="updatedEmailTemplateList + [emailTemplate:emailTemplate,location:emailTemplate.grapesLocation,versionName:versionName,grapesOrHtml:'grapes']"/>
<set field="updatedEmailTemplate" from="true"/>
<set field="logText" from="logText + ' updating grapesPublishedVersionName to ' + versionName"/>
</if>
<if condition="emailTemplate.htmlLocation == dbResourceToUpdate.location">
<if condition="emailTemplate.htmlLocation == dbResourceToUpdate.location &amp;&amp; emailTemplate.htmlPublishedVersionName != versionName">
<set field="emailTemplate.htmlPublishedVersionName" from="versionName"/>
<set field="updatedEmailTemplateList" from="updatedEmailTemplateList + [emailTemplate:emailTemplate,location:emailTemplate.htmlLocation,versionName:versionName,grapesOrHtml:'html']"/>
<set field="updatedEmailTemplate" from="true"/>
<set field="logText" from="logText + ' updating htmlPublishedVersionName to ' + versionName"/>
</if>
<log level="info" message="${logText}"/>
<entity-update value-field="emailTemplate"/>
</iterate>
</if>
</then><else>
<log level="info" message="Not updating from disk because file at ${child.location} and dbresource at ${dbResourceToUpdate.location} are the same"/>
</else></if>
</iterate>
</actions>
</service>
......