Commit b65d1737 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Sebastien Robin

Create and activate the System Preference of Cloudooo

In other to keep the promise, create an System Preference if no other were setupped.
parent d930fd56
......@@ -58,7 +58,14 @@ domain_port = promise_url.split(\'//\')[1].split(\'/\')[0]\n
port = domain_port.split(\':\')[-1]\n
domain = domain_port[:-(len(port)+1)]\n
\n
portal.portal_preferences.getActiveSystemPreference().edit(\n
system_preference = portal_preferences.getActiveSystemPreference()\n
if system_preference is None:\n
system_preference = portal_preferences.newContent(\n
portal_type="System Preference", \n
title="Created by Promise Alarms")\n
system_preference.enable()\n
\n
system_preference.edit(\n
preferred_ooodoc_server_address=domain,\n
preferred_ooodoc_server_port_number=port,\n
)\n
......
9
\ No newline at end of file
10
\ No newline at end of file
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