Hi,

Please, paste your code in the mail instead of screenshots, it makes it hard to 
read.
In your view, you are passing an Article instance to your serializer along with 
the many=True keyword which means the serializer will expect an iterable of 
Articles as the error suggests.

Regards,
Xavier O.
Linovia.


> Le 4 nov. 2020 à 07:03, Ashutosh Mishra <ashutoshmishra...@gmail.com> a écrit 
> :
> 
> whenever i try to fetch data usinng primary key,getting above error
> models.py
> <Screenshot from 2020-11-04 11-31-06.png>
> 
> serializer.py
> <Screenshot from 2020-11-04 11-31-13.png>
> 
> view.py
> <Screenshot from 2020-11-04 11-31-19.png>
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django REST framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-rest-framework+unsubscr...@googlegroups.com 
> <mailto:django-rest-framework+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-rest-framework/75f76a91-52ed-4cde-887c-26998ab2fe04n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-rest-framework/75f76a91-52ed-4cde-887c-26998ab2fe04n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> <Screenshot from 2020-11-04 11-31-19.png><Screenshot from 2020-11-04 
> 11-31-13.png><Screenshot from 2020-11-04 11-31-06.png>

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/4A8683CF-1ACA-4A39-87FC-8254C35C98ED%40linovia.com.

Reply via email to