Commit fac26f62 authored by Jérome Perrin's avatar Jérome Perrin

base: Person_createUserPreference must now return the created preference

This changes API on a script that some projects have customized, but
getActiveUserPreferecnce "should work" even with an old script not
returning preferences.

In that case, first call to getActiveUserPreference will create
preference but not return it, but next time getActiveUserPreference is
called, the preference will probably be indexed and will be returned.
parent 4d9a8fec
......@@ -23,3 +23,5 @@ for assignment in context.contentValues(portal_type='Assignment'):
if group:
preference.setPreferredSectionCategory(group)
preference.setPreferredAccountingTransactionSectionCategory(group)
return preference
......@@ -24,3 +24,5 @@ for assignment in context.contentValues(portal_type='Assignment'):
if group:
preference.setPreferredSectionCategory(group)
preference.setPreferredAccountingTransactionSectionCategory(group)
return preference
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