diff --git a/inexDataModel.py b/inexDataModel.py index c42f408..ccacaa8 100644 --- a/inexDataModel.py +++ b/inexDataModel.py @@ -14,8 +14,7 @@ def dataTemplate(transactionType,**kwargs): "name": kwargs.get('file_name'), "path": kwargs.get('file_path') }, - # upload/download:guid needed, figure out how to do this - "guid": f'{transactionType}:{kwargs.get("guid")}', + "guid": f'{transactionType.split("_")[1].rstrip("d").rstrip("e")}:{kwargs.get("guid")}', "node_name": kwargs.get('node_name'), "prd_ext_tenant_id": kwargs.get('prd_ext_tenant_id'), "product_name": "GlobalScape EFT", diff --git a/test.py b/test.py index c430b1f..4be6116 100644 --- a/test.py +++ b/test.py @@ -35,4 +35,8 @@ def identifyUtype(obj): if obj in file_downloaded: return "file_downloaded" else: - return "other" \ No newline at end of file + return "other" + +transactionType = 'file_uploaded' + +print(transactionType.split("_")[1].rstrip("d").rstrip("e")) \ No newline at end of file