CJYen vor 3 Jahren
Ursprung
Commit
a02f885c29
1 geänderte Dateien mit 1 neuen und 2 gelöschten Zeilen
  1. 1 2
      main.py

+ 1 - 2
main.py

@@ -207,7 +207,7 @@ async def receive(userModel : models.TransactionNft):
     # input
     # input
     nftid = userModel.nftid
     nftid = userModel.nftid
     address = userModel.address
     address = userModel.address
-
+    result = ""
     if not table2.find_one(id=nftid):
     if not table2.find_one(id=nftid):
         print("error: nft not found")
         print("error: nft not found")
         return {'msg': 'nft not found'}
         return {'msg': 'nft not found'}
@@ -215,7 +215,6 @@ async def receive(userModel : models.TransactionNft):
         statement = 'SELECT userid FROM users WHERE useraddress ="'+address+'"'
         statement = 'SELECT userid FROM users WHERE useraddress ="'+address+'"'
         for row in db.query(statement):
         for row in db.query(statement):
             result = row['userid']
             result = row['userid']
-
         user_obj = table2.find_one(id=nftid)
         user_obj = table2.find_one(id=nftid)
         user_obj['userid'] = result
         user_obj['userid'] = result
         table2.update(dict(user_obj), ['id'])
         table2.update(dict(user_obj), ['id'])