mdn/django-locallibrary-tutorial

'RenewBookForm' object has no attribute 'cleaned_data'

ducktapeonmydesk opened this issue · 1 comments

When trying to 'renew' a book, I get the error:
'RenewBookForm' object has no attribute 'cleaned_data'

If I change the code from
book_instance.due_back = form.cleaned_data['renewal_date']
to
book_instance.due_back = form['renewal_date']
everything goes through but the date never updates.

Disregard. Stupid syntax error. Forgot the () next to form.is_valid() & book_instance.save()