username validation
This commit is contained in:
parent
3952522e78
commit
4b045983c7
@ -194,6 +194,8 @@ def create_anonymous(username: str, room: Room, db: Session):
|
|||||||
|
|
||||||
def create_anonymous_member(username: str, room: Room, db: Session):
|
def create_anonymous_member(username: str, room: Room, db: Session):
|
||||||
anonymous = create_anonymous(username, room, db)
|
anonymous = create_anonymous(username, room, db)
|
||||||
|
if anonymous is None:
|
||||||
|
return None
|
||||||
member_id = generate_unique_code(Member, s=db)
|
member_id = generate_unique_code(Member, s=db)
|
||||||
member = Member(room=room, anonymous=anonymous, id_code=member_id)
|
member = Member(room=room, anonymous=anonymous, id_code=member_id)
|
||||||
db.add(member)
|
db.add(member)
|
||||||
|
Loading…
Reference in New Issue
Block a user