Commit 979f3d41 authored by Carlos Manso's avatar Carlos Manso
Browse files

Topology model updated to SQLAlchemy

parent 1a9c0447
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ class ContextServiceServicerImpl(ContextServiceServicer):
        return TopologyList(topologies=[db_topology.dump() for db_topology in db_topologies])

    @safe_and_metered_rpc_method(METRICS, LOGGER)
    def GetTopology(self, request: TopologyId, contextt : grpc.ServicerContext) -> Topology:
    def GetTopology(self, request: TopologyId, context : grpc.ServicerContext) -> Topology:
        context_uuid = request.context_id.context_uuid.uuid
        topology_uuid = request.topology_uuid.uuid

@@ -218,7 +218,6 @@ class ContextServiceServicerImpl(ContextServiceServicer):
            topology_add = TopologyModel(topology_uuid=topology_uuid, context_fk=context_uuid)
            topology_add.context = db_context
            updated = True
        with self.session() as session:
            result = session.query(TopologyModel).join(TopologyModel.context).filter(TopologyModel.topology_uuid==topology_uuid).options(contains_eager(TopologyModel.context)).one_or_none()

            if not result: