Skip to content

Commit

Permalink
Bugfix/skills (#17)
Browse files Browse the repository at this point in the history
* исправлены 2 ошибки

* исправлен баг skills
  • Loading branch information
sic15 authored Dec 10, 2023
1 parent 8d3c0d3 commit 2df05df
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions backend/api/v1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
from users.models import Specialization, UserProfile, UserResources, UserSkill


class SkillResourceSerializer(serializers.ModelSerializer):
"""Краткое отображение ресурсов библиотеки."""

class Meta:
model = ResourceLibrary
fields = '__all__'


class GroupSerializer(serializers.ModelSerializer):
"""Отображение группы."""

Expand Down Expand Up @@ -57,7 +65,7 @@ class SkillFrontSerializer(serializers.ModelSerializer):
"""Список всех навыков удобный фронту."""

group = GroupSerializer()
resource_library = ResourceLibrarySerializer(many=True)
resource_library = SkillResourceSerializer(many=True)
level = serializers.CharField(source='get_level_display')

class Meta:
Expand Down Expand Up @@ -214,7 +222,7 @@ class Meta:
class SkillDetailSerializer(serializers.ModelSerializer):
"""Детальная информация о навыке."""

resource_library = ResourceLibrarySerializer(many=True)
resource_library = SkillResourceSerializer(many=True)
specialization = SpecializationShortSerializer()

class Meta:
Expand Down

0 comments on commit 2df05df

Please sign in to comment.