|
@@ -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'])
|