Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -224,17 +224,17 @@ async def add_exp(member_id):
|
|
| 224 |
print("test1")
|
| 225 |
# discord_user_id column
|
| 226 |
for index, cell_value in global_df.iloc[:, 0].items():
|
| 227 |
-
print("test2")
|
| 228 |
# remove L (read, so no need to replace)
|
| 229 |
# tldr; set_as_dataframe forces scientific notation which corrupts discord_user_id data.
|
| 230 |
# set_as_dataframe is still highly efficient (1 API call), so we format numerical data as strings,
|
| 231 |
# which results in efficient google sheet updating + data integrity
|
| 232 |
if cell_value.startswith("L") and cell_value.endswith("L"):
|
| 233 |
-
print("test3")
|
| 234 |
cell_value_clipped = cell_value[1:-1]
|
| 235 |
# cell_value_clipped = 1234567890
|
| 236 |
-
print(f"cell_value_clipped: {cell_value_clipped}, type: {type(cell_value_clipped)}")
|
| 237 |
-
print(f"member_id: {member_id}, type: {type(member_id)}")
|
| 238 |
if cell_value_clipped == str(member_id): # str(member_id) needed, it is int by default
|
| 239 |
print("test4")
|
| 240 |
# if found, update that row...
|
|
@@ -359,7 +359,7 @@ async def add_exp(member_id):
|
|
| 359 |
#You can verify your account to earn 100 points! To verify, do A.
|
| 360 |
|
| 361 |
|
| 362 |
-
|
| 363 |
if not member_found:
|
| 364 |
print("test7")
|
| 365 |
# if not, create new record
|
|
|
|
| 224 |
print("test1")
|
| 225 |
# discord_user_id column
|
| 226 |
for index, cell_value in global_df.iloc[:, 0].items():
|
| 227 |
+
# print("test2")
|
| 228 |
# remove L (read, so no need to replace)
|
| 229 |
# tldr; set_as_dataframe forces scientific notation which corrupts discord_user_id data.
|
| 230 |
# set_as_dataframe is still highly efficient (1 API call), so we format numerical data as strings,
|
| 231 |
# which results in efficient google sheet updating + data integrity
|
| 232 |
if cell_value.startswith("L") and cell_value.endswith("L"):
|
| 233 |
+
# print("test3")
|
| 234 |
cell_value_clipped = cell_value[1:-1]
|
| 235 |
# cell_value_clipped = 1234567890
|
| 236 |
+
#print(f"cell_value_clipped: {cell_value_clipped}, type: {type(cell_value_clipped)}")
|
| 237 |
+
#print(f"member_id: {member_id}, type: {type(member_id)}")
|
| 238 |
if cell_value_clipped == str(member_id): # str(member_id) needed, it is int by default
|
| 239 |
print("test4")
|
| 240 |
# if found, update that row...
|
|
|
|
| 359 |
#You can verify your account to earn 100 points! To verify, do A.
|
| 360 |
|
| 361 |
|
| 362 |
+
print(f"------------------------------------------------------------------------")
|
| 363 |
if not member_found:
|
| 364 |
print("test7")
|
| 365 |
# if not, create new record
|