(self, old_parent_id, new_parent_id)
Reassign blobs' parent

        Both `old_parent_id` and `new_parent_id` must map to the same
        database partition.
Reassign blobs' parent
Reassign blobs parent
def reparent(self, old_parent_id, new_parent_id):
        """Reassign blobs' parent

        Both `old_parent_id` and `new_parent_id` must map to the same
        database partition.
        """
        dbname = get_db_alias_for_partitioned_doc(old_parent_id)
        new_db = get_db_alias_for_partitioned_doc(new_parent_id)
        assert dbname == new_db, ("Cannot reparent to new partition: %s -> %s" %
            (old_parent_id, new_parent_id))
        query = BlobMeta.objects.partitioned_query(old_parent_id)
        query.filter(parent_id=old_parent_id).update(parent_id=new_parent_id)
def reparent ( self , old_parent_id , new_parent_id ) : dbname = get_db_alias_for_partitioned_doc ( old_parent_id ) new_db = get_db_alias_for_partitioned_doc ( new_parent_id ) assert dbname == new_db , ( "Cannot reparent to new partition: %s -> %s" % ( old_parent_id , new_parent_id ) ) query = BlobMeta . objects . partitioned_query ( old_parent_id ) query . filter ( parent_id = old_parent_id ) . update ( parent_id = new_parent_id )