Skip to content

Commit 2ac4364

Browse files
committed
Update graphql type
1 parent 9480fda commit 2ac4364

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

netbox_config_backup/graphql/types.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,16 @@
33
import strawberry
44
import strawberry_django
55

6-
from netbox.graphql.types import NetBoxObjectType
6+
from netbox.graphql.types import PrimaryObjectType
77
from .filters import *
88

99
from netbox_config_backup import models
1010

11-
__all__ = (
12-
'BackupType',
13-
)
11+
__all__ = ('BackupType',)
1412

1513

16-
@strawberry_django.type(
17-
models.Backup,
18-
fields='__all__',
19-
filters=BackupFilter
20-
)
21-
class BackupType(NetBoxObjectType):
14+
@strawberry_django.type(models.Backup, fields='__all__', filters=BackupFilter)
15+
class BackupType(PrimaryObjectType):
2216

2317
name: str
2418
device: Annotated["DeviceType", strawberry.lazy('dcim.graphql.types')] | None

0 commit comments

Comments
 (0)