fix: gameModel.create is not cringe now

This commit is contained in:
starnakin 2023-12-18 23:18:39 +01:00
parent fb0f9be103
commit 0e946b3bb8

View File

@ -6,7 +6,7 @@ class GameModel(models.Model):
def create(self, users_id: [int]): def create(self, users_id: [int]):
self.save() self.save()
for user_id in users_id: 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 return self.pk
class GameMembersModel(models.Model): class GameMembersModel(models.Model):