Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Commit

Permalink
Fix a bug that stops creation of a new room
Browse files Browse the repository at this point in the history
Closes: #17
  • Loading branch information
SuyashD95 committed Feb 11, 2021
1 parent eec3b20 commit f3e7b0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion API/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ def post(self):
error_msg='Cannot create a new room because no user with the given name of the room admin exists.'
)

new_room = RoomModel(name=new_room_args['name'], admin_id=room_admin)
new_room = RoomModel(name=new_room_args['name'])
room_admin.is_admin.append(new_room)
db.session.add(new_room)
db.session.commit()

Expand Down

0 comments on commit f3e7b0f

Please sign in to comment.