Skip to content

Commit

Permalink
Exclude external_id from resources serializers (#1701)
Browse files Browse the repository at this point in the history
* fixes #1687; exclude `external_id` from resources serializers

* fix typo
  • Loading branch information
rithviknishad authored Nov 8, 2023
1 parent 1a232d7 commit 942cfe5
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions care/facility/api/serializers/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ def create(self, validated_data):

class Meta:
model = ResourceRequest
exclude = ("deleted",)
read_only_fields = TIMESTAMP_FIELDS + ("external_id",)
exclude = ("deleted", "external_id")
read_only_fields = TIMESTAMP_FIELDS


class ResourceRequestCommentSerializer(serializers.ModelSerializer):
Expand All @@ -195,9 +195,5 @@ def create(self, validated_data):

class Meta:
model = ResourceRequestComment
exclude = ("deleted", "request")
read_only_fields = TIMESTAMP_FIELDS + (
"created_by",
"external_id",
"id",
)
exclude = ("deleted", "request", "external_id")
read_only_fields = TIMESTAMP_FIELDS + ("created_by",)

0 comments on commit 942cfe5

Please sign in to comment.