For some reason I have a boolean field in a Store
model that has stopped updating. I have a frontend application (ember.js) and a Django Rest Framework backend.
I first thought the problem was in my ember application even though in the request it was sending the open
field correctly. I then noticed that in the browsable DRF API it was also ignoring the open field so there is definitely something wrong on the Django side of things.
# models.py
class Store(models.Model):
"""
Single vendor of coffee. The user will be able to access the store and
manage their drinks and information.
"""
user = models.OneToOneField(User)
name = models.CharField(max_length=30)
open = models.BooleanField(default=False)
confirm_message = models.CharField(max_length=500)
# serializers.py
class StoreSerializer(ModelSerializer):
class Meta:
model = Store
# views.py
class StoreViewSet(ModelViewSet):
queryset = Store.objects.all()
serializer_class = StoreSerializer
Everything seems pretty cookie-cutter but for some reason the BooleanField is being ignored. All the other fields are updating correctly.
Any ideas what it might be?