From 650413191933e87fc707cf2bcf1736283ef57c83 Mon Sep 17 00:00:00 2001 From: Aaron Lee Date: Sun, 3 Oct 2021 15:58:08 +0800 Subject: [PATCH] Fix randint issue --- upload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upload.py b/upload.py index f52cb12..099b4cb 100644 --- a/upload.py +++ b/upload.py @@ -98,7 +98,7 @@ def upload_homeroom(): if accs == []: break if (allUsers[key]['origUsername'] in accs): - db.child("Users").child(key).child("accounts").child("homeroom^"+gradec+classc+'^'+randint(10000)).update({ + db.child("Users").child(key).child("accounts").child("homeroom^"+gradec+classc+'^'+randint(10000, 99999)).update({ "homeroom": gradec + '^' + classc, "type": 'homeroom' }, session['token']) @@ -142,7 +142,7 @@ def upload_gp_classes(): if accs == []: break if (allUsers[key]['origUsername'] in accs): - db.child("Users").child(key).child("accounts").child("GP_Class^"+csv_dict.columns[i+1]+'^'+randint(10000)).update({ + db.child("Users").child(key).child("accounts").child("GP_Class^"+csv_dict.columns[i+1]+'^'+randint(10000, 99999)).update({ csv_dict.columns[i+1]: tmp_csv[j], "type": 'group' }, session['token'])