|
|
@@ -75,7 +75,7 @@ def list_item(designated_fn, art_name, art_desc, min_price, buyout_price, close_
|
|
|
# gen txhash
|
|
|
ddt = datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S")
|
|
|
dt = sqlalchemy.func.now()
|
|
|
- txstring = f'[{filehash}, {ddt}, {current_user.id}, {current_user.id}, 0.0]' # minting
|
|
|
+ txstring = f'[{filehash}, {ddt}, {current_user.id}, {current_user.id}, 0.0]' # listing
|
|
|
txhash = hsh.gen_txhash(txstring)
|
|
|
# fetch prev block hash OR GEN HASH
|
|
|
try:
|
|
|
@@ -147,6 +147,10 @@ def tx_exchange(filehash, source_id, price, dest_id=None):
|
|
|
# remove from List table
|
|
|
List.query.filter_by(filehash = filehash).delete()
|
|
|
|
|
|
+ # change owner at Art table
|
|
|
+ dbcall = Art.query.filter_by(filehash = filehash).first()
|
|
|
+ dbcall.owner = dest_id
|
|
|
+
|
|
|
db.session.commit()
|
|
|
|
|
|
def clean_bid_table(filehash):
|