From 759bbe9ddbee8098c2aeed7384d89d15c1a9127c Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Wed, 14 Jun 2023 20:01:49 -0700 Subject: [PATCH] Allow and default to NULL Sleep.nap via API Fixes #657 --- api/serializers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/serializers.py b/api/serializers.py index af3982b6..1a8191eb 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -183,6 +183,8 @@ class NoteSerializer(CoreModelSerializer, TaggableSerializer): class SleepSerializer(CoreModelWithDurationSerializer, TaggableSerializer): + nap = serializers.BooleanField(allow_null=True, default=None, required=False) + class Meta(CoreModelWithDurationSerializer.Meta): model = models.Sleep fields = (