[Answer]-Django database not updating

1👍

Try saving the game before you attach it to other_game.

game.matched_with = other_game
game.save()
other_game.matched_with = game
other_game.save()

This will then save other_game with the newly created instance of game.

Read more about save() in the docs.

👤Ewan

Leave a comment