Skip to content

7.2.0

Compare
Choose a tag to compare
@Kani999 Kani999 released this 17 Mar 10:12
· 8 commits to main since this release
7db517d

Release 7.2.0

What's Changed:

New Contributors:

Enhancements:

  • Introduced model-level validation to ensure attachments are only created for permitted object types. Attempting to attach to an unpermitted model will raise a ValidationError.
  • Added a new validation function validate_object_type used across forms and models to enforce attachment permissions.
  • Updated the README with a new badge and additional documentation for the validation checks.

Technical Changes:

  • Forms:
    • Added _validate_object_type method to the NetBoxAttachmentForm to validate object types during form cleaning.
  • Models:
    • Enhanced NetBoxAttachment model with validation logic in the save method to ensure only permitted models can have attachments.
    • Improved deletion method to preserve original filenames post-deletion.
  • Utilities:
    • Added validate_object_type function to determine eligible models for attachments based on plugin settings.
    • Added choice_default utility function to handle default values for settings.
  • Template Content:
    • Updated to use the new validate_object_type function to dynamically generate template extensions for eligible models.

Full Changelog: 7.1.0...7.2.0


This release introduces significant validation improvements to ensure that attachments are only created for permitted models, enhancing the overall security and integrity of the plugin.

Release 7.2.0