Skip to content

Calling save() on InventoryItem without changes produces unnecessary changelog entry #6599

@bluecmd

Description

@bluecmd

NetBox version

v2.11.6

Python version

3.7

Steps to Reproduce

  1. Call save() on an InventoryItem via Netbox Script:
it = InventoryItem.objects.all()[0]
it.save()
  1. Check changelog of the object
  2. The changelog only shows "Post-Change Data" and an empty "Pre-Change Data"

If I call .snapshot() before the "Pre-Change Data" is populated, and the UI shows "No difference".

Expected Behavior

Observed Behavior

An moot changelog entry is created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions