Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix: if disc count lower than 3, it's crash
Browse files Browse the repository at this point in the history
  • Loading branch information
uysalibov committed Mar 18, 2024
1 parent 63f255f commit 2bdee34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion marble-sculp/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,11 @@ async def extend(request: Request, payload: DiscModel):
# if i == 0 and j == 0:
# continue
# for d in range(len(payload.data)):
for d in range(3):
if len(payload.data) >= 3:
adet = 3
else:
adet = len(payload.data)
for d in range(adet):
discon = deepcopy(payload.data[d])

temp_circ = Circle(radius=10)
Expand Down

0 comments on commit 2bdee34

Please sign in to comment.