try-django-19 icon indicating copy to clipboard operation
try-django-19 copied to clipboard

AttributeError: 'bool' object has no attribute 'last'

Open MayurUp opened this issue 6 years ago • 0 comments

Hi, I am having trouble when I want to make a second post.

File "/posts/models.py", line 37, in upload_location new_id = 1 qs = PostModel.objects.order_by("id").exists() if qs: new_id = qs.last().id + 1 AttributeError: 'bool' object has no attribute 'last'

Can anyone help me with this?

MayurUp avatar Mar 10 '19 08:03 MayurUp