1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Add image_attachments to Device, Location, Rack, Site

This commit is contained in:
jeremystretch
2021-08-03 11:38:18 -04:00
parent 0df67dbc12
commit 8ad958708f
2 changed files with 17 additions and 4 deletions

View File

@@ -0,0 +1,12 @@
import graphene
__all__ = (
'ImageAttachmentsMixin',
)
class ImageAttachmentsMixin:
image_attachments = graphene.List('extras.graphql.types.ImageAttachmentType')
def resolve_image_attachments(self, info):
return self.images.restrict(info.context.user, 'view')