Skip to content
Snippets Groups Projects
Verified Commit 593c4366 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

fix: work around the validation for cbaSeriesIs & defaultPlaylistId

Closes #178
parent dd8df9e5
No related branches found
No related tags found
No related merge requests found
Pipeline #7762 passed
...@@ -558,6 +558,16 @@ class ShowSerializer(serializers.HyperlinkedModelSerializer): ...@@ -558,6 +558,16 @@ class ShowSerializer(serializers.HyperlinkedModelSerializer):
"type_id", "type_id",
) + read_only_fields ) + read_only_fields
@staticmethod
def validate_cba_series_id(value):
# FIXME: ugly hack to capture 0 as None
return None if value == 0 else value
@staticmethod
def validate_default_playlist_id(value):
# FIXME: ugly hack to capture 0 as None
return None if value == 0 else value
def create(self, validated_data): def create(self, validated_data):
""" """
Create and return a new Show instance, given the validated data. Create and return a new Show instance, given the validated data.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment