JournalEntry Comments model is not set to allow empty (blank) comments #11818

Closed
opened 2025-12-29 21:50:16 +01:00 by adam · 0 comments
Owner

Originally created by @arthanson on GitHub (Nov 7, 2025).

Originally assigned to: @arthanson on GitHub.

NetBox Edition

NetBox Community

NetBox Version

v4.4.5

Python Version

3.10

Steps to Reproduce

  1. Go to an object like a Site and click on the Journal tab
  2. Leave all the fields default (so Comments is blank) and click Save

Expected Behavior

The journal entry is saved, but the model actually isn't set correctly to allow it. This can cause issues with branching (see: #356.

Observed Behavior

If you look at other comment fields, for example netbox/models/__init__.py.PrimaryModel you will see that blank=True is set:

    comments = models.TextField(
        verbose_name=_('comments'),
        blank=True
    )

this corresponds to the utility/forms/fields/py.CommentField which sets required=False. But on JournalEntry it is defined:

    comments = models.TextField(
        verbose_name=_('comments'),
    )

The mis-match causes issues with Branching.

Originally created by @arthanson on GitHub (Nov 7, 2025). Originally assigned to: @arthanson on GitHub. ### NetBox Edition NetBox Community ### NetBox Version v4.4.5 ### Python Version 3.10 ### Steps to Reproduce 1. Go to an object like a Site and click on the Journal tab 2. Leave all the fields default (so Comments is blank) and click Save ### Expected Behavior The journal entry is saved, but the model actually isn't set correctly to allow it. This can cause issues with branching (see: [#356](https://github.com/netboxlabs/netbox-branching/issues/356). ### Observed Behavior If you look at other comment fields, for example `netbox/models/__init__.py.PrimaryModel` you will see that `blank=True` is set: ``` comments = models.TextField( verbose_name=_('comments'), blank=True ) ``` this corresponds to the `utility/forms/fields/py.CommentField` which sets `required=False`. But on JournalEntry it is defined: ``` comments = models.TextField( verbose_name=_('comments'), ) ``` The mis-match causes issues with Branching.
adam added the type: bugstatus: acceptednetboxseverity: low labels 2025-12-29 21:50:16 +01:00
adam closed this issue 2025-12-29 21:50:17 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11818