You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our codebase contains instances where the .add() and .set() methods for handling M2M relationships have been used incorrectly. The .add() method is intended to append new relationships without affecting existing ones, while the .set() method replaces the entire set of relationships, removing any not included in the new list. Misusing these methods can lead to unintended data loss and inconsistencies in the relationships. We need to review the code for proper usage and refactor any incorrect implementations to ensure data integrity and maintainability.
Most instances of using .set() seem to involve assigning regulated_products or activities to an operation or reporting_operation.
create_or_update_operation
set_registration_purpose
save_report_operation
Acceptance Criteria
Ensure proper usage of .set() across the codebase and add regression tests if necessary.
The text was updated successfully, but these errors were encountered:
Describe the task
Our codebase contains instances where the
.add()
and.set()
methods for handling M2M relationships have been used incorrectly. The.add()
method is intended to append new relationships without affecting existing ones, while the.set()
method replaces the entire set of relationships, removing any not included in the new list. Misusing these methods can lead to unintended data loss and inconsistencies in the relationships. We need to review the code for proper usage and refactor any incorrect implementations to ensure data integrity and maintainability.Most instances of using
.set()
seem to involve assigningregulated_products
oractivities
to an operation or reporting_operation.Acceptance Criteria
.set()
across the codebase and add regression tests if necessary.The text was updated successfully, but these errors were encountered: