Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nshmdb/nshmdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def get_rupture_faults(self, rupture_id: int) -> dict[str, Fault]:
(rupture_id,),
)
fault_planes = cursor.fetchall()
faults = collections.defaultdict(lambda: Fault([]))
faults = collections.defaultdict(lambda: [])
for (
_,
top_left_lat,
Expand All @@ -386,10 +386,10 @@ def get_rupture_faults(self, rupture_id: int) -> dict[str, Fault]:
[bottom_left_lat, bottom_left_lon, bottom],
]
)
faults[parent_name].planes.append(
faults[parent_name].append(
Plane(coordinates.wgs_depth_to_nztm(corners))
)
return faults
return {name: Fault(planes) for name, planes in faults.items()}

def get_rupture_fault_info(self, rupture_id: int) -> dict[str, FaultInfo]:
"""Get the rupture fault information for a given rupture.
Expand Down