Commit 63ebacbe authored by Jérome Perrin's avatar Jérome Perrin

ERP5Type: use low level accessors to get text content

getTextContent maybe overloaded by subclasses, for example in
TextDocument it checks that users can access document in raw format.
parent 19a2dfcd
...@@ -54,7 +54,7 @@ class TextContentHistoryMixin: ...@@ -54,7 +54,7 @@ class TextContentHistoryMixin:
previous_text_content = None previous_text_content = None
result = [] result = []
for history_dict in history_dict_list: for history_dict in history_dict_list:
text_content = historicalRevision(self, history_dict['tid']).getTextContent() text_content = historicalRevision(self, history_dict['tid'])._baseGetTextContent()
if text_content and text_content != previous_text_content: if text_content and text_content != previous_text_content:
history_dict['time'] = history_dict['time'] history_dict['time'] = history_dict['time']
history_dict['user_name'] = history_dict['user_name'].strip() history_dict['user_name'] = history_dict['user_name'].strip()
...@@ -78,6 +78,6 @@ class TextContentHistoryMixin: ...@@ -78,6 +78,6 @@ class TextContentHistoryMixin:
serial = apply(pack, ('>HHHH',) + tuple(map(int, key.split('.')))) serial = apply(pack, ('>HHHH',) + tuple(map(int, key.split('.'))))
rev = historicalRevision(self, serial) rev = historicalRevision(self, serial)
return rev.getTextContent() return rev._baseGetTextContent()
InitializeClass(TextContentHistoryMixin) InitializeClass(TextContentHistoryMixin)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment