Wednesday, September 28, 2016

Re: Django MongoEngine rest api app post request.POST.get('id')

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 <> wrote:

 for id in taxi_id:
        taxi = TaxiMaster.objects(id=id).first()

        temp = BookedTaxi(

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
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

Peter of the Norse

No comments:

Post a Comment