Release: dev → main (first public release) #258
@@ -391,9 +391,10 @@ class PostAssociationService:
|
||||
auto_id = conclusive[0][0].id
|
||||
|
||||
linked = 0
|
||||
for group, score, signals, identity in scored:
|
||||
for group, score, signals, _identity in scored:
|
||||
status = "linked" if group.id == auto_id else "pending"
|
||||
linked += status == "linked"
|
||||
if status == "linked":
|
||||
linked += 1
|
||||
self.session.add(PostAssociation(
|
||||
announcement_post_id=announcement.id,
|
||||
payload_post_id=group.id,
|
||||
|
||||
@@ -306,7 +306,7 @@ async def test_a_dismissed_pair_is_never_proposed_again(db):
|
||||
svc = PostAssociationService(db)
|
||||
assert await svc.match_post(
|
||||
teaser.id, threshold=DEFAULT_THRESHOLD, window_hours=WINDOW,
|
||||
) == 1
|
||||
) == (1, 0)
|
||||
await db.commit()
|
||||
|
||||
assoc = (await db.execute(select(PostAssociation))).scalar_one()
|
||||
|
||||
Reference in New Issue
Block a user