Price Mistral aliases from the listing name when the group disagrees #786 (GitHub #785)
Mergedtombeckenhammerged 1 commit into
main from785-mistral-medium-3-5-ids-log-pricing-lost-parser-miss-althoughmerged by tombeckenham View on GitHubtombeckenham linked this to fix #785
- @@ -1943,11 +1950,13 @@19431950 const first = donors[0]19441951 if (!first) continue19451952 const serialized = JSON.stringify(first[fact])1946- if (donors.some((donor) => JSON.stringify(donor[fact]) !== serialized)) {1947- continue1948- }1953+ const agreed = donors.every(1954+ (donor) => JSON.stringify(donor[fact]) === serialized,1955+ )19491956 for (const id of group) {19501957 const target = byId.get(id)19511958 if (!target || target[fact] != null) continue1952- Object.assign(target, { [fact]: first[fact] })1953- const source = first.factSources?.[fact]1959+ const named = namedAs.get(id)1960+ const namedDonor =1961+ named && group.includes(named) ? byId.get(named) : undefined1962+ const donor = agreed ? first : namedDonor@@ -1943,11 +1950,15 @@19431950 const first = donors[0]19441951 if (!first) continue19451952 const serialized = JSON.stringify(first[fact])1946- if (donors.some((donor) => JSON.stringify(donor[fact]) !== serialized)) {1947- continue1948- }1953+ const agreed = donors.every(1954+ (donor) => JSON.stringify(donor[fact]) === serialized,1955+ )19491956 for (const id of group) {19501957 const target = byId.get(id)19511958 if (!target || target[fact] != null) continue1952- Object.assign(target, { [fact]: first[fact] })1953- const source = first.factSources?.[fact]1959+ const named = namedAs.get(id)1960+ const namedDonor =1961+ named && group.includes(named) ? byId.get(named) : undefined1962+ const donor = agreed ? first : namedDonor1963+ if (!donor || donor[fact] == null) continue1964+ Object.assign(target, { [fact]: donor[fact] })
tombeckenham merged this01eabeb
tombeckenham closed this
Sign in to join this conversation.
⚠️ No Changeset found#
Latest commit: 3e571495b491d49722b928e4b68149bc53bb8968
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR