mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-01-19 01:23:02 +08:00
Add id to document request unit serializer context
This commit is contained in:
parent
9198867346
commit
c9e6928e8a
1 changed files with 4 additions and 4 deletions
|
@ -59,8 +59,8 @@ class DocumentRequestUnitSerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = DocumentRequestUnit
|
model = DocumentRequestUnit
|
||||||
fields = ["document", "copies"]
|
fields = ["id", "document", "copies"]
|
||||||
read_only_fields = ["document", "copies"]
|
read_only_fields = ["id", "document", "copies"]
|
||||||
|
|
||||||
|
|
||||||
class DocumentRequestUnitWithFileSerializer(serializers.ModelSerializer):
|
class DocumentRequestUnitWithFileSerializer(serializers.ModelSerializer):
|
||||||
|
@ -68,8 +68,8 @@ class DocumentRequestUnitWithFileSerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = DocumentRequestUnit
|
model = DocumentRequestUnit
|
||||||
fields = ["document", "copies"]
|
fields = ["id", "document", "copies"]
|
||||||
read_only_fields = ["document", "copies"]
|
read_only_fields = ["id", "document", "copies"]
|
||||||
|
|
||||||
|
|
||||||
class DocumentRequestSerializer(serializers.ModelSerializer):
|
class DocumentRequestSerializer(serializers.ModelSerializer):
|
||||||
|
|
Loading…
Reference in a new issue