[Answered ]-Using double underscore to directly update foreign key's field in Django?

1👍

You can’t update this way but you can update it other way round

You should use reverse foreign key relationship like this

ForeignModel.objects.filter(mymodel_set__id=10).update(foreign_key_field=some_value)

Leave a comment