Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect representation of installed module when listing module bays using REST API brief mode #15243

Closed
jeremystretch opened this issue Feb 23, 2024 · 0 comments · Fixed by #15245
Assignees
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@jeremystretch
Copy link
Member

Deployment Type

NetBox Cloud

NetBox Version

v3.7.3

Python Version

3.11

Steps to Reproduce

  1. Create at least one module bay on a device
  2. Install a module on that bay
  3. Visit /api/dcim/module-bays/
  4. Visit /api/dcim/module-bays/?brief=true

Expected Behavior

The serialized representation of the module bay should include an installed_module field in both responses, with a representation of the installed module.

Observed Behavior

The installed_module field is absent when brief mode is enabled. There is instead an empty module field.

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: medium Results in substantial degraded or broken functionality for specfic workflows labels Feb 23, 2024
@abhi1693 abhi1693 self-assigned this Feb 23, 2024
@abhi1693 abhi1693 added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Feb 23, 2024
jeremystretch added a commit that referenced this issue Feb 23, 2024
)

* Use primary serializers for brief mode

* Remove BriefModeMixin

* Correct ModuleBayTest brief_fields (see #15243)
jeremystretch added a commit that referenced this issue Feb 23, 2024
* added installed_module on NestedModuleBaySerializer #15243

* Update test

---------

Co-authored-by: Jeremy Stretch <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants