new_book_shelf = BookShelf.create(
user=user, book=book, shelf=read_shelf,
start_date='2020-09-12', rate='5', comment="Very good book"
کد من دقیقا با استاد مطابقت داره
دلیل اینکه وقتی این رو ران میکنم این ارور رو میگیرم چیه؟
Exception has occurred: OperationalError
(1242, 'Subquery returns more than 1 row')
MySQLdb.OperationalError: (1242, 'Subquery returns more than 1 row')
During handling of the above exception, another exception occurred:
line 53, in show_user_data
new_book_shelf = BookShelf.create(
^^^^^^^^^^^^^^^^^
line 63, in
show_user_data(username='hosein')
peewee.OperationalError: (1242, 'Subquery returns more than 1 row')