Commit f70bc102 authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_credential: Allow create assignments with infinit duration

parent e67db42c
...@@ -21,7 +21,10 @@ open_assignment_list = context.CredentialRequest_closePersonAssignment(old_role_ ...@@ -21,7 +21,10 @@ open_assignment_list = context.CredentialRequest_closePersonAssignment(old_role_
#Initialisation #Initialisation
assignment_duration = context.portal_preferences.getPreferredCredentialAssignmentDuration() assignment_duration = context.portal_preferences.getPreferredCredentialAssignmentDuration()
today = DateTime() today = DateTime()
delay = today+assignment_duration if assignment_duration < 0:
delay = None
else:
delay = today+assignment_duration
current_assignment_list = {} current_assignment_list = {}
for assignment in open_assignment_list: for assignment in open_assignment_list:
......
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