Skip to content

added fields to GSRSharedCodeSerializer#391

Merged
minghansun1 merged 1 commit into
masterfrom
minghan-update-gsr-sharing-response
Feb 10, 2026
Merged

added fields to GSRSharedCodeSerializer#391
minghansun1 merged 1 commit into
masterfrom
minghan-update-gsr-sharing-response

Conversation

@minghansun1
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

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

Updates the public share-code booking serialization/tests to expose more booking/GSR detail when retrieving a shared booking.

Changes:

  • Expand SharedGSRBookingSerializer fields to include booking_id, room_id, and a nested gsr object.
  • Update share-code view tests to assert the new response structure and fields.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
backend/tests/gsr_booking/test_share_codes.py Adjusts assertions for the shared-booking payload/serializer to match the expanded response shape.
backend/gsr_booking/serializers.py Changes shared booking serializer output from building to nested gsr, and adds additional booking fields.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/tests/gsr_booking/test_share_codes.py
Comment thread backend/tests/gsr_booking/test_share_codes.py
Comment thread backend/gsr_booking/serializers.py
@minghansun1 minghansun1 force-pushed the minghan-update-gsr-sharing-response branch from 08aca1f to 485166e Compare February 10, 2026 17:26
Copy link
Copy Markdown

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

self.assertIn("is_valid", data)
self.assertIn("owner_name", data)

# Should not have owner info
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The test asserts owner_name is included, but immediately after it says "Should not have owner info". Clarify the intent by adjusting the comment to reflect what is actually forbidden (e.g., exclude user/owner objects but allow owner_name), or remove owner_name from the expected output if it shouldn't be public.

Suggested change
# Should not have owner info
# Should not expose owner-related model fields (only owner_name is allowed)

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

@khoiddinh khoiddinh left a comment

Choose a reason for hiding this comment

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

LGTM

@minghansun1 minghansun1 merged commit 1279ee4 into master Feb 10, 2026
14 checks passed
@minghansun1 minghansun1 deleted the minghan-update-gsr-sharing-response branch February 10, 2026 18:03
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.

4 participants