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:
12
netbox/extras/graphql/mixins.py
Normal file
12
netbox/extras/graphql/mixins.py
Normal 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')
|
||||
Reference in New Issue
Block a user