refactor collection filters with django_filters
Compare changes
Files
2- Konrad Mohrfeldt authored
There were some problems during audio_url generation for notes: 1. the cba_id was never part of the Note serializer so getting values from the validated data needed to fail. 2. the get_audio_url utililty function returned None if no cba_id was provided if a the CBA_API_KEY was missing, but None but the respective model field is not nullable on the note. 3. Request or JSON decoder errors would bubble unhandled, even though audio_url generation seems to be optional and should not necessarily interfere with note creation.
+ 2
− 1
@@ -453,6 +453,7 @@ class NoteSerializer(serializers.ModelSerializer):
@@ -476,7 +477,7 @@ class NoteSerializer(serializers.ModelSerializer):