CJYen 3 năm trước cách đây
mục cha
commit
a02f885c29
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      main.py

+ 1 - 2
main.py

@@ -207,7 +207,7 @@ async def receive(userModel : models.TransactionNft):
     # input
     nftid = userModel.nftid
     address = userModel.address
-
+    result = ""
     if not table2.find_one(id=nftid):
         print("error: 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+'"'
         for row in db.query(statement):
             result = row['userid']
-
         user_obj = table2.find_one(id=nftid)
         user_obj['userid'] = result
         table2.update(dict(user_obj), ['id'])