Profiles: Fix plotting of empty geometry profiles, causing (non-blocking) error in the console

new_design_pol
Dylan Jeannin 2026-09-01 16:57:50 +02:00
parent c3288b44bb
commit 237364a4e2
1 changed files with 1 additions and 1 deletions

View File

@ -1003,7 +1003,7 @@ class ProfileXYZ(Profile, SQLSubModel):
Projection of the points of the profile on a plane.
"""
if self.nb_points < 2:
return [0.0]
return [0.0] * self.nb_points
else:
if self.station_up_to_date:
return self._station