Skip to content

Commit

Permalink
feature: verify widget type before delete
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanJaeger committed Nov 18, 2024
1 parent f4130c8 commit 177e02b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion insights/widgets/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def update(self, request, *args, **kwargs):
serializer = self._update(widget, update_data, partial)
return Response(serializer.data)

if config.get("operation") != "recurrence":
if config.get("operation") != "recurrence" and widget.type != "recurrence":
try:
widget.report.delete()
except Report.DoesNotExist:
Expand Down

0 comments on commit 177e02b

Please sign in to comment.