4👍
✅
Use subquery to update field, something similar to following as you cannot use F() function in update joining tables
Album.objects.update(
user=Subquery(
Band.objects.filter(
id=OuterRef('band')
).values('user')[:1]
)
)
Source:stackexchange.com