Commit bb05a278 authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_credential: Don"t set start date on assignments if stop date is None

parent 72ab3327
......@@ -23,8 +23,11 @@ assignment_duration = context.portal_preferences.getPreferredCredentialAssignmen
today = DateTime()
if assignment_duration < 0:
delay = None
start_date = None
else:
delay = today+assignment_duration
start_date = today - 1
current_assignment_list = {}
for assignment in open_assignment_list:
......@@ -57,7 +60,7 @@ for role in context.getRoleList():
function = context.getFunctionList(),
group = context.getGroupList(),
destination = organisation_url,
start_date = today - 1,
start_date = start_date,
stop_date = delay)
assignment.open()
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