Spaces:
Runtime error
Runtime error
CaesarCloudSync
commited on
Commit
·
3398148
1
Parent(s):
6d70265
RevisionBank Repalace Revision cards corrected
Browse files
main.py
CHANGED
@@ -264,7 +264,9 @@ async def storerevisioncards(data : JSONStructure = None, authorization: str = H
|
|
264 |
user_revision_cards["email"] = current_user # Sets the email to the current user.
|
265 |
#importcsv.db.accountrevisioncards.delete_many({"email":current_user}) # Allows data to be updated.
|
266 |
#importcsv.db.accountrevisioncards.insert_one(user_revision_cards) # Inserts the new data.
|
267 |
-
|
|
|
|
|
268 |
return {"message":"revision cards updated"}
|
269 |
elif cards_not_exist == []: # If the cards are already in the database, return a message.
|
270 |
return {"message":"No new cards"}
|
|
|
264 |
user_revision_cards["email"] = current_user # Sets the email to the current user.
|
265 |
#importcsv.db.accountrevisioncards.delete_many({"email":current_user}) # Allows data to be updated.
|
266 |
#importcsv.db.accountrevisioncards.insert_one(user_revision_cards) # Inserts the new data.
|
267 |
+
importcsv.db.accountrevisioncards.replace_one(
|
268 |
+
{"email":current_user},user_revision_cards
|
269 |
+
)
|
270 |
return {"message":"revision cards updated"}
|
271 |
elif cards_not_exist == []: # If the cards are already in the database, return a message.
|
272 |
return {"message":"No new cards"}
|