X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ff382f6c37063c0c4c5d21c2834a8759e25c5d02..05b7014d1d710937c6a4b5cdccdb4890f377818d:/src/api/fields.py?ds=inline diff --git a/src/api/fields.py b/src/api/fields.py index 66fd7d2e9..b6269da16 100644 --- a/src/api/fields.py +++ b/src/api/fields.py @@ -1,11 +1,10 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from rest_framework import serializers from sorl.thumbnail import default -from django.core.urlresolvers import reverse -from paypal.rest import user_is_subscribed +from django.urls import reverse +from club.models import Membership class AbsoluteURLField(serializers.ReadOnlyField): @@ -45,7 +44,7 @@ class UserPremiumField(serializers.ReadOnlyField): super(UserPremiumField, self).__init__(*args, source='*', **kwargs) def to_representation(self, value): - return user_is_subscribed(value) + return Membership.is_active_for(value) class ThumbnailField(serializers.FileField):