Skip to content

Commit

Permalink
chore: remove traces (#4290)
Browse files Browse the repository at this point in the history
  • Loading branch information
DawoudSheraz authored Mar 14, 2024
1 parent 82b7d38 commit 59915e4
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions course_discovery/apps/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from django.utils.text import slugify
from django.utils.translation import gettext_lazy as _
from django_countries.serializer_fields import CountryField
from edx_django_utils.monitoring import function_trace
from localflavor.us.us_states import CONTIGUOUS_STATES
from opaque_keys.edx.locator import CourseLocator
from rest_flex_fields.serializers import FlexFieldsSerializerMixin
Expand Down Expand Up @@ -432,7 +431,6 @@ def get_banner_image_url(self, obj):
return None

@classmethod
@function_trace('organization_serializer_prefetch')
def prefetch_queryset(cls, partner):
return Organization.objects.filter(partner=partner).select_related('partner').prefetch_related('tags')

Expand Down Expand Up @@ -778,7 +776,6 @@ class SeatSerializer(BaseModelSerializer):
bulk_sku = serializers.CharField()

@classmethod
@function_trace('seat_serializer_fetch')
def prefetch_queryset(cls):
return Seat.everything.all().select_related('currency', 'type')

Expand Down Expand Up @@ -927,7 +924,6 @@ class MinimalCourseRunSerializer(FlexFieldsSerializerMixin, TimestampModelSerial
variant_id = serializers.UUIDField(allow_null=True, required=False)

@classmethod
@function_trace('minimal_course_run_serializer_prefetch')
def prefetch_queryset(cls, queryset=None):
# Explicitly check for None to avoid returning all CourseRuns when the
# queryset passed in happens to be empty.
Expand Down Expand Up @@ -1183,7 +1179,6 @@ class MinimalCourseSerializer(FlexFieldsSerializerMixin, TimestampModelSerialize
course_run_statuses = serializers.ReadOnlyField()

@classmethod
@function_trace('minimal_course_serializer_prefetch')
def prefetch_queryset(cls, queryset=None, course_runs=None):
# Explicitly check for None to avoid returning all Courses when the
# queryset passed in happens to be empty.
Expand Down Expand Up @@ -1994,7 +1989,6 @@ def get_organization_logo_override_url(self, obj):
return None

@classmethod
@function_trace('minimal_program_prefetch_trace')
def prefetch_queryset(cls, partner, queryset=None):
# Explicitly check if the queryset is None before selecting related
queryset = queryset if queryset is not None else Program.objects.filter(partner=partner)
Expand Down Expand Up @@ -2301,7 +2295,6 @@ class PathwaySerializer(BaseModelSerializer):
course_run_statuses = serializers.ReadOnlyField()

@classmethod
@function_trace('pathways_program_prefetch')
def prefetch_queryset(cls, partner):
queryset = Pathway.objects.filter(partner=partner)

Expand Down

0 comments on commit 59915e4

Please sign in to comment.