Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion spamdb/modules/clas.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import random
from string import ascii_letters, digits
from faker import Faker
from modules.env import env
import modules.util as util
from modules.user import User

def update_clas_colls() -> None:
args = env.args
db = env.db
fake = Faker()

if args.drop:
db.clas_clas.drop()
Expand Down Expand Up @@ -45,7 +47,7 @@ def update_clas_colls() -> None:
"_id": "student" + str(student_index) + ":" + clas_id,
"userId": "student" + str(student_index),
"clasId": clas_id,
"realName": "Student " + str(student_index) + " in class " + clas_name,
"realName": fake.name(),
"notes": "",
"managed": True,
"created": {
Expand Down
1 change: 1 addition & 0 deletions spamdb/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ idna==3.6
pymongo==4.8.0
requests==2.31.0
urllib3==2.2.1
faker==33.1.0