Fixes #55: Add VirtualMachine support for License and Contract assignments#130
Merged
Merged
Conversation
b82705a to
c8ace64
Compare
c8ace64 to
9c47fb7
Compare
9c47fb7 to
5d41f5a
Compare
DanSheps
approved these changes
Dec 16, 2025
…t assignments - Add virtual_machine ForeignKey to LicenseAssignment and SupportContractAssignment models - Enforce mutual exclusivity between device and virtual_machine via clean() and CheckConstraint - Module assignments restricted to devices only (not VMs) - Update forms with TabbedGroups for Device vs Virtual Machine selection - Add virtual_machine filters to filtersets - Add virtual_machine to API serializers with nested VirtualMachineSerializer - Add virtual_machine columns to tables - Add Support Contracts card to VirtualMachine detail pages via template extension - Add HTMX views for lazy-loading VM contract data - Add comprehensive tests for VM functionality - Update README to document VM support
5d41f5a to
cc6fd02
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
virtual_machineForeignKey to bothLicenseAssignmentandSupportContractAssignmentmodels, allowing licenses and support contracts to be assigned to Virtual Machines in addition to Devices.Key Changes
virtual_machinefield with mutual exclusivity constraint (device OR virtual_machine, not both)virtual_machineandvirtual_machine_idfiltersVirtualMachineSerializerDatabase Migration
Migration
0016_add_virtual_machine_support.pyadds:virtual_machineForeignKey to both modelsCheckConstraintenforcing device/VM mutual exclusivityCloses #55