Fixed the issue caused by last commit

This commit is contained in:
Shalabh Aggarwal 2012-09-23 15:13:41 +05:30
parent e9185da184
commit 7e19903bb5
1 changed files with 5 additions and 3 deletions

View File

@ -587,14 +587,16 @@ class Project(ModelSQL, ModelView):
# that user cannot be removed as tryton's domain does not permit
# this.
# So removing assigned user from those tasks as well.
# TODO: Find a better way to do it, this is memore intensive
self.search([
# TODO: Find a better way to do it, this is memory intensive
assigned_to_participant = self.search([
('id', 'in', records_to_update),
('assigned_to', '=', participant_id)
])
self.write(assigned_to_participant, {
'assigned_to': False,
})
self.write(
records_to_update, {
'assigned_to': False,
'participants': [('unlink', [participant_id])]
}
)