fix: gameModel.create is not cringe now
This commit is contained in:
parent
fb0f9be103
commit
0e946b3bb8
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user