Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/resolvers/snapshot.py
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
class VisitSnapshotNode(BaseSnapshotNode): | class VisitSnapshotNode(BaseSnapshotNode): | ||||
""" | """ | ||||
Node resolver for a snapshot requested from a visit-status | Node resolver for a snapshot requested from a visit-status | ||||
""" | """ | ||||
obj: BaseVisitStatusNode | obj: BaseVisitStatusNode | ||||
def _get_node_data(self): | def _get_node_data(self): | ||||
# self.obj.snapshotSWHID is the requested snapshot SWHID | |||||
snapshot_id = self.obj.snapshotSWHID.object_id | snapshot_id = self.obj.snapshotSWHID.object_id | ||||
return self._get_snapshot_by_id(snapshot_id) | return self._get_snapshot_by_id(snapshot_id) | ||||
class TargetSnapshotNode(BaseSnapshotNode): | class TargetSnapshotNode(BaseSnapshotNode): | ||||
""" | """ | ||||
Node resolver for a snapshot requested as a target | Node resolver for a snapshot requested as a target | ||||
""" | """ | ||||
Show All 26 Lines |