Skip to content

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

@arthanson

Description

@arthanson

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.

Metadata

Metadata

Assignees

Labels

netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions