fix: Correct serializer model reference.
When linking a DRF serializer with a model, you need to link it to the model class not an instance of the model. The newer version of DRF tries to access the model_manager from the model here and runs into issues if it's not defined correctly.
This commit is contained in:
@@ -16,7 +16,7 @@ class IntegritySignatureSerializer(serializers.ModelSerializer):
|
||||
created_at = serializers.DateTimeField(source='created')
|
||||
|
||||
class Meta:
|
||||
model = IntegritySignature()
|
||||
model = IntegritySignature
|
||||
fields = ('username', 'course_id', 'created_at')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user