Skip to content

Fix inconsistent sharing fields between ProjectSerializer and ProjectDetailSerializer#60

Merged
RETR0-OS merged 2 commits intoclaude/graph-sharing-feature-x9qdtfrom
copilot/sub-pr-59
Feb 23, 2026
Merged

Fix inconsistent sharing fields between ProjectSerializer and ProjectDetailSerializer#60
RETR0-OS merged 2 commits intoclaude/graph-sharing-feature-x9qdtfrom
copilot/sub-pr-59

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

ProjectDetailSerializer (used for retrieve) was missing share_token and is_shared, while ProjectSerializer (used for list/create) exposed both — making sharing status unavailable on the detail endpoint.

Changes

  • ProjectDetailSerializer: Added share_token and is_shared to fields and read_only_fields, matching ProjectSerializer's contract
class ProjectDetailSerializer(serializers.ModelSerializer):
    class Meta:
        model = Project
        fields = [
            'id', 'name', 'description', 'framework',
            'share_token', 'is_shared',          # added
            'architecture', 'created_at', 'updated_at'
        ]
        read_only_fields = ['id', 'share_token', 'is_shared', 'created_at', 'updated_at']

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ent API responses

Co-authored-by: RETR0-OS <74290459+RETR0-OS@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback on graph sharing feature Fix inconsistent sharing fields between ProjectSerializer and ProjectDetailSerializer Feb 23, 2026
Copilot AI requested a review from RETR0-OS February 23, 2026 05:08
@RETR0-OS RETR0-OS marked this pull request as ready for review February 23, 2026 05:11
Copilot AI review requested due to automatic review settings February 23, 2026 05:11
@RETR0-OS RETR0-OS merged commit 1c67a21 into claude/graph-sharing-feature-x9qdt Feb 23, 2026
@RETR0-OS RETR0-OS deleted the copilot/sub-pr-59 branch February 23, 2026 05:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an API contract inconsistency where ProjectDetailSerializer (used for retrieve operations) was missing the share_token and is_shared fields that were already exposed in ProjectSerializer (used for list/create operations). This made sharing status unavailable when fetching project details.

Changes:

  • Added share_token and is_shared to ProjectDetailSerializer.Meta.fields to match ProjectSerializer
  • Added both fields to read_only_fields to prevent client modification (consistent with server-side sharing management)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants