-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Milestone
Description
Deployment Type
NetBox Cloud
NetBox Version
v4.2.5
Python Version
3.10
Steps to Reproduce
- View a site and click the "Journal" tab.
- Add a journal entry without specifying a kind.
Expected Behavior
The kind field should always be required (AFAICT):
class JournalEntry(...):
kind = models.CharField(
verbose_name=_('kind'),
max_length=30,
choices=JournalEntryKindChoices,
default=JournalEntryKindChoices.KIND_INFO
)Observed Behavior
The kind field is not required by either the model's form or its REST API serializer.
class JournalEntryForm(NetBoxModelForm):
kind = forms.ChoiceField(
label=_('Kind'),
choices=add_blank_choice(JournalEntryKindChoices),
required=False
)class JournalEntrySerializer(NetBoxModelSerializer):
kind = ChoiceField(
choices=JournalEntryKindChoices,
required=False
)Metadata
Metadata
Assignees
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application