Closes #6708: Add image attachment support for circuits, power panels

This commit is contained in:
jeremystretch
2021-10-01 12:50:51 -04:00
parent 357a5d1e65
commit f3fe3f9a18
5 changed files with 12 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
from django.contrib.contenttypes.fields import GenericRelation
from django.core.exceptions import ValidationError
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import models
@@ -39,6 +40,9 @@ class PowerPanel(PrimaryModel):
name = models.CharField(
max_length=100
)
images = GenericRelation(
to='extras.ImageAttachment'
)
objects = RestrictedQuerySet.as_manager()