not self.objects :(

This commit is contained in:
Holger Sielaff
2025-08-27 10:24:07 +02:00
parent 83018b013f
commit 4984ee138f

View File

@@ -345,7 +345,7 @@ class LxcTemplate(ProxmoxAbstractModel, TaskAwareModelMixin):
def save(self, *args, **kwargs):
if self.is_default_template:
self.objects.filter(models.Q(is_default_template=True), ~models.Q(internal_id=self.pk)).update(is_default_template=False)
self.__class__.objects.filter(models.Q(is_default_template=True), ~models.Q(internal_id=self.pk)).update(is_default_template=False)
super().save(*args, **kwargs)
def __str__(self):