scout/adapter/mongo/variant_loader.py
def update_variant(self, variant_obj):
        """Update one variant document in the database.

        This means that the variant in the database will be replaced by variant_obj.

        Args:
            variant_obj(dict)

        Returns:
            new_variant(dict)
        """
        LOG.debug('Updating variant %s', variant_obj.get('simple_id'))

        new_variant = self.variant_collection.find_one_and_replace(
            {'_id': variant_obj['_id']},
            variant_obj,
            return_document=pymongo.ReturnDocument.AFTER
        )
        return new_variant
def update_variant(self, variant_obj):
        LOG.debug('Updating variant %s', variant_obj.get('simple_id'))

        new_variant = self.variant_collection.find_one_and_replace(
            {'_id': variant_obj['_id']},
            variant_obj,
            return_document=pymongo.ReturnDocument.AFTER
        )
        return new_variant
def update_variant ( self , variant_obj ) : LOG . debug ( 'Updating variant %s' , variant_obj . get ( 'simple_id' ) ) new_variant = self . variant_collection . find_one_and_replace ( { '_id' : variant_obj [ '_id' ] } , variant_obj , return_document = pymongo . ReturnDocument . AFTER ) return new_variant
Update one variant document in the database.

        This means that the variant in the database will be replaced by variant_obj.

        Args:
            variant_obj(dict)

        Returns:
            new_variant(dict)
Update one variant document in the database .