Ensure we copy records correctly

This commit is contained in:
Albert Cervera i Areny 2023-04-03 14:04:43 +02:00
parent c5da95bb00
commit 8704c6cac9
1 changed files with 4 additions and 2 deletions

View File

@ -94,9 +94,11 @@ class ResultSet:
parameters = []
if records is None:
records = []
# Copy so that we do not modify the original records
self.records = records[:]
self.records = []
for record in records:
# Copy so that we do not modify the original records
record = record[:]
self.records.append(record)
for i, value in enumerate(record):
if isinstance(value, Decimal):
# Ensure we do not try to send Decimal to the client