Commit 3b390ffb authored by Alexander Lercher's avatar Alexander Lercher

Fixed swagger

parent 16d9711d
class ClusterC:
'''
This class represents connected clusters between layers where weights are the number of shared nodes.
Connections are stored with one 'source' cluster which is connected to n 'destination' clusters, with n >= 0.
:param cluster_label: The cluster label of the 'source' cluster
:param cluster_layer: The layer name of the 'source' cluster
:param cluster_runId: The run which calculated the connections
:param cluster_containedNodesDict: Ids of nodes contained in the 'source' cluster
:param cluster_connNodesDict: Ids of nodes contained in 'dest' clusters, where the 'dest' cluster is uniquely identifiable by layer name and cluster label
:param cluster_connClustDict: Layer name, cluster label and weight for each 'dest' cluster
'''
def __init__(self,cluster_label,cluster_layer,cluster_runId,cluster_containedNodesDict,cluster_connNodesDict,cluster_connClustDict):
......
......@@ -132,6 +132,11 @@ class Repository(MongoRepositoryBase):
#region connected_run
def convert_run_to_json_support(self, run_from_db: dict) -> dict:
''' Converts the ObjectId from MongoDb to its string repr. '''
run_from_db['_id'] = str(run_from_db['_id'])
return run_from_db
def add_connected_run(self, conRunTimestamp):
''' Add Connected Run Data to DB '''
result = super().insert_entry(self._connected_run, conRunTimestamp)
......@@ -146,7 +151,7 @@ class Repository(MongoRepositoryBase):
output = []
for e in entries:
output.append(e)
output.append(self.convert_run_to_json_support(e))
return output
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment