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

Floor Plan Tiles navigation link produces error #60

Closed
joewesch opened this issue Dec 6, 2023 · 0 comments · Fixed by #81
Closed

Floor Plan Tiles navigation link produces error #60

joewesch opened this issue Dec 6, 2023 · 0 comments · Fixed by #81
Assignees

Comments

@joewesch
Copy link
Contributor

joewesch commented Dec 6, 2023

Environment

  • Python version: 3.10.13
  • Nautobot version: 2.0.5
  • nautobot-floor-plan version: 2.0.0

Expected Behavior

I assumed there would be a list view of the tiles on a floor plan (or something)

Observed Behavior

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 204, in _get_response
    response = response.render()
  File "/usr/local/lib/python3.10/site-packages/django/template/response.py", line 105, in render
    self.content = self.rendered_content
  File "/usr/local/lib/python3.10/site-packages/rest_framework/response.py", line 70, in rendered_content
    ret = renderer.render(self.data, accepted_media_type, context)
  File "/usr/local/lib/python3.10/site-packages/nautobot/core/views/renderers.py", line 278, in render
    return super().render(data, accepted_media_type=accepted_media_type, renderer_context=renderer_context)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/renderers.py", line 723, in render
    context = self.get_context(data, accepted_media_type, renderer_context)
  File "/usr/local/lib/python3.10/site-packages/nautobot/core/views/renderers.py", line 174, in get_context
    table = self.construct_table(view, request=request, permissions=permissions)
  File "/usr/local/lib/python3.10/site-packages/nautobot/core/views/renderers.py", line 63, in construct_table
    table_class = view.get_table_class()
  File "/usr/local/lib/python3.10/site-packages/nautobot/core/views/mixins.py", line 310, in get_table_class
    self.table_class is not None

Exception Type: AssertionError at /plugins/floor-plan/floor-plan-tiles/
Exception Value: 'FloorPlanTileUIViewSet' should include a `table_class` attribute for bulk operations

Steps to Reproduce

  1. Go to a floor plan in the UI
  2. Click on a tile
  3. Click on the link in the navigation bar to Floor Plan Tiles

For example, on this page you can see the navigation bar read:

Locations / Europe → Netherlands → AMS01 → ams01-dc-pod-1 / Floor Plan for Location "ams01-dc-pod-1" / Floor Plan Tiles / Tile (2, 2, 2, 2) in Floor Plan for Location "ams01-dc-pod-1"

And clicking on Floor Plan Tiles produces the error.

@tsm1th tsm1th self-assigned this Apr 9, 2024
tsm1th added a commit to tsm1th/nautobot-app-floor-plan that referenced this issue Apr 9, 2024
@tsm1th tsm1th mentioned this issue Apr 9, 2024
3 tasks
joewesch added a commit that referenced this issue Apr 11, 2024
* Resolves #60

* Fixes CI issue

* Removed unused import statement

* Disabled abstract class check in pylint

* Disabled abstract class check in pylint

* CI issue

* Changed fragment to reference new feature issue

* Update nautobot_floor_plan/templates/nautobot_floor_plan/floorplan_retrieve.html

Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>

* Update changes/60.fixed

Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>

* Resolved code review suggestions

* Removed import that was no longer needed

---------

Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>
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 a pull request may close this issue.

2 participants