Skip to content

The bookmark widget breaks the frontpage when LOGIN_REQUIRED is False #13513

@kkthxbye-code

Description

@kkthxbye-code

NetBox version

v3.6.0-beta2

Python version

3.11

Steps to Reproduce

  1. Set LOGIN_REQUIRED = False in configuration.py
  2. Open the frontpage without a logged in session

Expected Behavior

The home view should render

Observed Behavior

The following exception is thrown:

Field 'id' expected a number but got <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f765c2bf150>>.

Issue is here:

bookmarks = Bookmark.objects.filter(user=request.user).order_by(self.config['order_by'])

request.user is passed to the filter regardless of the user being logged in or not.

Metadata

Metadata

Assignees

Labels

betaConcerns a bug/feature in a beta releaseseverity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions