From 06135177c2883889e38eb9a19a2b3fca443fe263 Mon Sep 17 00:00:00 2001 From: Lvyshnevska Date: Fri, 13 Oct 2023 10:04:50 +0200 Subject: [PATCH] if removed --- profiles/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/profiles/views.py b/profiles/views.py index 27bbb8487..6b68d1b6d 100644 --- a/profiles/views.py +++ b/profiles/views.py @@ -179,9 +179,9 @@ def get_serializer_class(self): def perform_destroy(self, instance): serializer = self.get_serializer(data=self.request.data) - if serializer.is_valid(raise_exception=True): - instance.is_deleted = True - instance.save() + serializer.is_valid(raise_exception=True) + instance.is_deleted = True + instance.save() class ViewedCompanyList(ListCreateAPIView):