Remove an item from the List of embed document in MONGOENGINE

class EquipmentList(EmbeddedDocument): equipmentId = ............. Class Deployment(Document): equipmentList = ListField(EmbeddedDocumentListField(EquipmentList)) mongoengine older version deployment is instance of Deployment deployment = Deployement.objects.get(id="test111") deployment.update(pull__equipmentList__equipmentId=equipment.pk) new version mongoengine update_one insted of update

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.