Commit bb0cf2e5 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 c178b782
...@@ -23,3 +23,5 @@ for assignment in context.contentValues(portal_type='Assignment'): ...@@ -23,3 +23,5 @@ for assignment in context.contentValues(portal_type='Assignment'):
if group: if group:
preference.setPreferredSectionCategory(group) preference.setPreferredSectionCategory(group)
preference.setPreferredAccountingTransactionSectionCategory(group) preference.setPreferredAccountingTransactionSectionCategory(group)
return preference
...@@ -24,3 +24,5 @@ for assignment in context.contentValues(portal_type='Assignment'): ...@@ -24,3 +24,5 @@ for assignment in context.contentValues(portal_type='Assignment'):
if group: if group:
preference.setPreferredSectionCategory(group) preference.setPreferredSectionCategory(group)
preference.setPreferredAccountingTransactionSectionCategory(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