Browse Source

HUE-3091 [oozie] Do not remove extra new lines from email action body

krish 10 năm trước cách đây
mục cha
commit
2b18df6af1
2 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 2 2
      apps/oozie/src/oozie/models2.py
  2. 1 0
      apps/oozie/src/oozie/tests2.py

+ 2 - 2
apps/oozie/src/oozie/models2.py

@@ -192,7 +192,7 @@ class Workflow(Job):
     sub_wfs_ids = [node.data['properties']['workflow'] for node in nodes if node.data['type'] == 'subworkflow']
     workflow_mapping = dict([(workflow.uuid, Workflow(document=workflow)) for workflow in Document2.objects.filter(uuid__in=sub_wfs_ids)])
 
-    xml = re.sub(re.compile('\s*\n+', re.MULTILINE), '\n', django_mako.render_to_string(tmpl, {
+    xml = re.sub(re.compile('>\s*\n+', re.MULTILINE), '>\n', django_mako.render_to_string(tmpl, {
               'wf': self,
               'workflow': data['workflow'],
               'nodes': nodes,
@@ -200,7 +200,7 @@ class Workflow(Job):
               'node_mapping': node_mapping,
               'workflow_mapping': workflow_mapping
           }))
-    return force_unicode(xml)
+    return force_unicode(xml.strip())
 
   @property
   def name(self):

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
apps/oozie/src/oozie/tests2.py


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác