Remove unused files and enhance error handling in serializers.py

- Deleted the outdated backend dependency file for drf-spectacular.
- Removed an unused image from the frontend assets.
- Improved error handling in TasksSerializer by catching ObjectDoesNotExist in addition to AttributeError.
This commit is contained in:
IGNY8 VPS (Salman)
2025-11-17 13:21:32 +00:00
parent 2605c62eec
commit e3d4ba2c02
4 changed files with 121 additions and 38 deletions

View File

@@ -1,5 +1,6 @@
from rest_framework import serializers
from django.db import models
from django.core.exceptions import ObjectDoesNotExist
from .models import Tasks, Images, Content
from igny8_core.business.planning.models import Clusters, ContentIdeas
@@ -85,7 +86,7 @@ class TasksSerializer(serializers.ModelSerializer):
def _get_content_record(self, obj):
try:
return obj.content_record
except AttributeError:
except (AttributeError, ObjectDoesNotExist):
return None
def get_content_html(self, obj):