Commit 8745f912 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_discussion: fix unknow column preference_state in ERP5Site_getUserPreferredForumSettingsDict

parent 077b6dba
...@@ -60,13 +60,15 @@ portal = context.getPortalObject()\n ...@@ -60,13 +60,15 @@ portal = context.getPortalObject()\n
def getPreferredForumSignature(username):\n def getPreferredForumSignature(username):\n
result = {\'preferred_forum_signature\': None,\n result = {\'preferred_forum_signature\': None,\n
\'preferred_forum_quote_original_message\': False}\n \'preferred_forum_quote_original_message\': False}\n
preference = portal.portal_catalog.getResultValue(\n preference_list = portal.portal_catalog(\n
portal_type=\'Preference\',\n portal_type=\'Preference\',\n
owner = username,\n owner = username,\n
preference_state=\'enabled\')\n )\n
if preference is not None:\n for preference in preference_list: \n
result[\'preferred_forum_signature\'] = preference.getPreferredForumSignature()\n if preference.getPreferenceState() == "enabled":\n
result[\'preferred_forum_quote_original_message\'] = preference.getPreferredForumQuoteOriginalMessage()\n result[\'preferred_forum_signature\'] = preference.getPreferredForumSignature()\n
result[\'preferred_forum_quote_original_message\'] = preference.getPreferredForumQuoteOriginalMessage()\n
break # user should not have more than 1 enabled preference\n
\n \n
return result\n return result\n
\n \n
......
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