Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(grouping): Fix new secondary hash save prevention (#86057)
An error which occurred while we were adding metadata to a newly-created secondary grouphash got me wondering how we'd even landed there in the first place, as we're not supposed to be saving new secondary grouphashes. As it turns out, our test for whether or not to bail before saving was only catching cases in which _all_ of the secondary grouphashes were new. This fixes that by instead filtering the list of grouphashes, so that a) existing secondary grouphashes can have metadata added to them, and b) new secondary grouphashes are all prevented from being stored, regardless of what other hashes have been calculated. Note that since `test_secondary_grouphashes_not_saved_when_creating_new_group` still passes, we know that the current behavior with all secondary hashes are new is preserved, and since `test_filters_new_secondary_hashes_when_creating_grouphashes` is no longer xfailed, we know the problem behavior has been fixed.
- Loading branch information