Fix comparison to check for identical instances.

Review Request #14385 — Created March 20, 2025 and updated

Information

django-assert-queries
main

Reviewers

The model proxies used for deleted object comparisons resulted in a
regression where two references to the same instance weren't guaranteed
to be considered equal.

We now check that the two objects being compared are the same instance
before going into more elaborate checks.

Unit tests pass in django-assert-queries, Djblets, and Review Board.

Summary ID
Fix comparison to check for identical instances.
The model proxies used for deleted object comparisons resulted in a regression where two references to the same instance weren't guaranteed to be considered equal. We now check that the two objects being compared are the same instance before going into more elaborate checks.
ef6493a7986fbee0967a637b58c94531edc87053
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
Loading...