Fix v2 api update_recordset

Fix v2 api update_recordset when updating a recordset's records.

Change-Id: I91a91b075787dfc6df4e6a590a0e92ecc942ba45
Closes-Bug: 1412539
This commit is contained in:
stanzgy 2015-01-20 02:29:22 +08:00
parent 679c420878
commit 39322736e2
1 changed files with 2 additions and 3 deletions

View File

@ -175,9 +175,8 @@ class RecordSetsController(rest.RestController):
# Remove deleted records if we haver provided a records array
if record_update:
for record in recordset.records:
if record.data in records_to_rm:
recordset.records.remove(record)
recordset.records[:] = [record for record in recordset.records
if record.data not in records_to_rm]
# Add new records
for record in records_to_add: