<reponame>ejplatform/django-courier<filename>courier/pushnotifications/providers/onesignal/serializers.py
from rest_framework import serializers

from .models import NotificationProfile


class NotificationProfileSerializer(serializers.ModelSerializer):
    user = serializers.HiddenField(
            default=serializers.CurrentUserDefault()
    )

    class Meta:
        model = NotificationProfile
        fields = ('user', 'onesignal_id',)

from rest_framework import serializers

from .models import NotificationProfile


class NotificationProfileSerializer(serializers.ModelSerializer):
    user = serializers.HiddenField(
            default=serializers.CurrentUserDefault()
    )

    class Meta:
        model = NotificationProfile
        fields = ('user', 'onesignal_id',)