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 b397e9c5a7
commit f4fe6c96c8
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.db import models
from django.urls import reverse
@@ -202,6 +203,9 @@ class Circuit(PrimaryModel):
comments = models.TextField(
blank=True
)
images = GenericRelation(
to='extras.ImageAttachment'
)
# Cache associated CircuitTerminations
termination_a = models.ForeignKey(