diff --git a/apiserver/storage/JsonFileStorageAdapter.py b/apiserver/storage/JsonFileStorageAdapter.py index 55f7aaae61eb0224dfe27baaa90fdacb66885226..4489df1262ea5377da25b9f39de1c5e7fb612e91 100644 --- a/apiserver/storage/JsonFileStorageAdapter.py +++ b/apiserver/storage/JsonFileStorageAdapter.py @@ -89,7 +89,13 @@ class JsonFileStorageAdapter(AbstractLocationDataStorageAdapter): return {id : data} def delete(self, type:LocationDataType, id:str, usr: str): - pass + localpath = os.path.join(self.data_dir, type.value) + fullpath = os.path.join(localpath, id) + + if not os.path.isfile(fullpath): + raise FileNotFoundError('The requested Object does not exist.') + + os.remove(fullpath) def getOwner(self, type: LocationDataType, id: str): raise NotImplementedError()