Mongo keeps giving me syntax error on this line;
existingVideo = self.request.root.db.videos.find_one( { '$or' : [ { '_id' : ObjectId( video["serverVideoID"] ) } , '$and' : [ { '_id' : serverAuthorID } , { 'clientGUID' : video['clientGUID'] } ] ] })
but I can’t see what’s wrong with it. It looks valid to me, but can anyone spot the error here?
It looks like you are missing one set of
{ }around the $and clause.Your query should be: