diff --git a/sdk/diffgram/file/compound_file.py b/sdk/diffgram/file/compound_file.py index 716b22e..f74da63 100644 --- a/sdk/diffgram/file/compound_file.py +++ b/sdk/diffgram/file/compound_file.py @@ -107,12 +107,15 @@ class CompoundFile: project: Project parent_file_data: dict child_files: List[CompoundChildFile] + instance_list: List[dict] - def __init__(self, project: Project, name: str, directory_id: int): + def __init__(self, project: Project, name: str, directory_id: int, instance_list: List[dict] = [], file_type: str = 'compound'): self.project = project self.name = name self.directory_id = directory_id self.child_files = [] + self.instance_list = instance_list + self.type = file_type @staticmethod def from_dict(project: Project, dir_id: int, dict_data: dict): @@ -162,7 +165,9 @@ def __create_compound_parent_file(self): url = f'/api/v1/project/{self.project.project_string_id}/file/new-compound' data = { 'name': self.name, - 'directory_id': self.directory_id + 'directory_id': self.directory_id, + 'instance_list': self.instance_list, + 'type': self.type } response = self.project.session.post(url = self.project.host + url, json = data)