When trying to use $inc I get a Syntax error stating that $set is wrong. My query is as follow:
mongo_db.campaign.update({\'_id\': str(campaign_id)}, { $inc:
pymongo == 2.7 campaign_id = bson.ObjectId(campaign_id) mongo_db.campaign.update({'_id': campaign_id}, {'$inc': {'item': 1}})