@@ -140,11 +140,7 @@ export function get_property_assignments(
140140 * grouped by structure, value (satisfied / unsatisfied), and deduced status.
141141 * We exclude undecidable properties here.
142142 */
143- export function get_property_assignments_by_deduction (
144- db : Database ,
145- structures : { id : string } [ ] ,
146- type : StructureType ,
147- ) {
143+ export function get_property_assignments_by_deduction ( db : Database , type : StructureType ) {
148144 const rows = db
149145 . prepare <
150146 [ string ] ,
@@ -173,15 +169,14 @@ export function get_property_assignments_by_deduction(
173169 }
174170 > = { }
175171
176- for ( const structure of structures ) {
177- grouped [ structure . id ] = {
172+ for ( const row of rows ) {
173+ const { property_id, structure_id, is_satisfied, is_deduced } = row
174+
175+ grouped [ structure_id ] ??= {
178176 satisfied : { non_deduced : new Set ( ) , deduced : new Set ( ) } ,
179177 unsatisfied : { non_deduced : new Set ( ) , deduced : new Set ( ) } ,
180178 }
181- }
182179
183- for ( const row of rows ) {
184- const { property_id, structure_id, is_satisfied, is_deduced } = row
185180 grouped [ structure_id ] [ is_satisfied ? 'satisfied' : 'unsatisfied' ] [
186181 is_deduced ? 'deduced' : 'non_deduced'
187182 ] . add ( property_id )
0 commit comments