Hi I am using Flask Peewee and trying to update merchant_details model but it is not working. Following is the error I am getting:
AttributeError: 'SelectQuery' object has no attribute 'update'
mdetails = merchant_details.filter(merchant_details.merchant_id==session['userid']).update(
merchant_name=request.form['merchantname'],
first_name=request.form['firstname'],
last_name=request.form['lastname'],
)
Please Help!
MerchantDetails.update(MerchantDetails.name='new name')
this is an invalid Python syntax. – Hackneyed