We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0512e2 commit 625825dCopy full SHA for 625825d
netbox/virtualization/models/virtualmachines.py
@@ -200,7 +200,9 @@ def clean(self):
200
# Validate aggregate disk size
201
if self.pk:
202
total_disk = self.virtualdisks.aggregate(Sum('size', default=0))['size__sum']
203
- if total_disk and self.disk != total_disk:
+ if total_disk and self.disk is None:
204
+ self.disk = total_disk
205
+ elif total_disk and self.disk != total_disk:
206
raise ValidationError({
207
'disk': _(
208
"The specified disk size ({size}) must match the aggregate size of assigned virtual disks "
0 commit comments