Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
remove comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
camsom committed Oct 1, 2015
1 parent ce51507 commit 4a0f781
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
21 changes: 0 additions & 21 deletions bulbs/contributions/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,27 +341,6 @@ def update(self, instance, validated_data):

return profile

# def to_representation(self, obj):
# if isinstance(obj, FeatureTypeOverride):
# data = FeatureTypeOverrideSerializer(obj).to_representation(obj)
# else:
# data = super(OverrideSerializer, self).to_representation(obj)

# feature_types = []

# feature_types_qs = self.get_feature_types(obj).first()
# if feature_types_qs:
# for feature_type in feature_types_qs.feature_types.all().order_by('-updated_on'):
# feature_types.append(
# FeatureTypeOverrideSerializer(
# feature_type
# ).to_representation(
# feature_type
# )
# )
# data["feature_types"] = feature_types
# return data


class ContributionListSerializer(serializers.ListSerializer):

Expand Down
6 changes: 3 additions & 3 deletions tests/contributions/test_contributions_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from bulbs.content.models import Content, FeatureType, Tag
from bulbs.contributions.models import (
Contribution, ContributorRole, ManualRate, HourlyRate,
Contribution, ContributorRole, ManualRate, HourlyRate, FeatureTypeOverride,
FlatRate, FlatRateOverride, FeatureTypeRate, FreelanceProfile, LineItem, OverrideProfile,
Rate, RATE_PAYMENT_TYPES
)
Expand Down Expand Up @@ -432,8 +432,8 @@ def test_override_multiple_feature_types(self):
feature_types = resp.data['feature_types']
self.assertEqual(len(feature_types), 2)
self.assertEqual(feature_types[0]['rate'], 90)
# self.assertEqual(FeatureTypeOverrideProfile.objects.count(), 1)
# self.assertEqual(Override.objects.count(), 1)
self.assertEqual(OverrideProfile.objects.count(), 1)
self.assertEqual(FeatureTypeOverride.objects.count(), 2)

# TODO: custom validation if no feature_types for rates

Expand Down

0 comments on commit 4a0f781

Please sign in to comment.