Skip to content

Commit eacfb97

Browse files
committed
fix for recipient type update query
1 parent 2f8b794 commit eacfb97

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ukgrantmaking/management/commands/grants/update_recipient_type.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ def recipient_type(db_con, company_batch_size):
244244
)
245245
.update(
246246
recipient_type_manual=Subquery(
247-
GrantRecipient.objects.filter(pk=OuterRef("pk")).values(
248-
"type_manual"
249-
)[:1]
247+
GrantRecipient.objects.filter(
248+
recipient_id=OuterRef("recipient_id")
249+
).values("type_manual")[:1]
250250
),
251251
)
252252
)

0 commit comments

Comments
 (0)