Problem
Models have properties defined at the class level (not the instance level like it would be done inside an __init__() method). Several of them are mutables: list or dict in our use case.
When creating a model, defaults values are retrieved from class attributes, and if one was already defined by a previous operation, the new model will "benefit" of the same value. It introduces silly issues like the one seen in NXDRIVE-2479.
Solution
For mutable properties, instead of trying to use them directly, we must use a copy of them to prevent data leak.
- is required by
-
NXDRIVE-2479 Fix transfers stability when using S3 direct upload
- Resolved
- Is referenced in