From 0e946b3bb80ede814cfb0b7f44b4af6f48410c4e Mon Sep 17 00:00:00 2001 From: starnakin Date: Mon, 18 Dec 2023 23:18:39 +0100 Subject: [PATCH] fix: gameModel.create is not cringe now --- games/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games/models.py b/games/models.py index a2d8315..9a23ad9 100644 --- a/games/models.py +++ b/games/models.py @@ -6,7 +6,7 @@ class GameModel(models.Model): def create(self, users_id: [int]): self.save() for user_id in users_id: - GameMembersModel(game_id=self.pk, member_id=user_id) + GameMembersModel(game_id=self.pk, member_id=user_id).save() return self.pk class GameMembersModel(models.Model):