user = User.objects.filter(email='[EMAIL PROTECTED]')[ 0 ]

On 1 окт, 10:30, cschand <[EMAIL PROTECTED]> wrote:
> Hello all,
>   I have a problem with get objects from User
>
> when i give
> user = User.objects.get(email='[EMAIL PROTECTED]')
>
> if only one data is there it is executing ok... but if there are two
> or more it showing and AssertionError
> get() returned more than one User -- it returned 2!
>
> Is there any way to limit to return only one data.. ?
>
> thanks in advance
> cschand


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to