Are you doing request.POST.get(’taxi_id’) here? Because that will return a string. And in that case, id would be each letter in the actual ID. Try switching it to request.POST.getlist(’taxi_id’).
> On Sep 27, 2016, at 9:43 AM, samer sarker <[email protected]> wrote: > > for id in taxi_id: > taxi = TaxiMaster.objects(id=id).first() > > temp = BookedTaxi( > taxi_id=id, > driver_id=taxi.user_id, > is_seen=0, > is_accepted=0, > is_rejected=0 > ) > > > > > > > ValidationError at /action > > u'5' is not a valid ObjectId, it must be a 12-byte input of type 'str' or a > 24-character hex string > > > > how to solve this error > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/django-users > <https://groups.google.com/group/django-users>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/57545fd3-2460-44ee-8988-079998523a54%40googlegroups.com > > <https://groups.google.com/d/msgid/django-users/57545fd3-2460-44ee-8988-079998523a54%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. Peter of the Norse [email protected] -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2FE239C8-4A1A-4C3F-8B10-6B7DB2BEF693%40Radio1190.org. For more options, visit https://groups.google.com/d/optout.

