Browse Source

9856 misc fixes

Arthur 2 năm trước cách đây
mục cha
commit
a0d0ab1e78
3 tập tin đã thay đổi với 6 bổ sung8 xóa
  1. 3 3
      base_requirements.txt
  2. 2 4
      netbox/dcim/graphql/types.py
  3. 1 1
      requirements.txt

+ 3 - 3
base_requirements.txt

@@ -131,9 +131,9 @@ social-auth-core
 # https://github.com/python-social-auth/social-app-django/blob/master/CHANGELOG.md
 social-auth-app-django
 
-# Enhanced Strawberry GraphQL integration with Django
-# https://github.com/blb-ventures/strawberry-django-plus/blob/main/CHANGELOG.md
-strawberry-graphql-django
+# Strawberry GraphQL Django extension
+# https://github.com/strawberry-graphql/strawberry-django/blob/main/CHANGELOG.md
+strawberry-django
 
 # SVG image rendering (used for rack elevations)
 # https://github.com/mozman/svgwrite/blob/master/NEWS.rst

+ 2 - 4
netbox/dcim/graphql/types.py

@@ -118,7 +118,6 @@ class CableTerminationType(NetBoxObjectType):
         Annotated["PowerOutletType", strawberry.lazy('dcim.graphql.types')],
         Annotated["PowerPortType", strawberry.lazy('dcim.graphql.types')],
         Annotated["RearPortType", strawberry.lazy('dcim.graphql.types')],
-
     ], strawberry.union("CableTerminationTerminationType")]]:
         return self.termination
 
@@ -586,12 +585,11 @@ class SiteGroupType(VLANGroupsMixin, ContactsMixin, OrganizationalObjectType):
 
 @strawberry_django.type(
     models.VirtualChassis,
-    # fields='__all__',
-    exclude=('member_count',),  # bug - temp
+    fields='__all__',
     filters=VirtualChassisFilter
 )
 class VirtualChassisType(NetBoxObjectType):
-    pass
+    member_count: BigInt
 
 
 @strawberry_django.type(

+ 1 - 1
requirements.txt

@@ -30,7 +30,7 @@ PyYAML==6.0.1
 requests==2.31.0
 social-auth-app-django==5.4.0
 social-auth-core[openidconnect]==4.5.2
-strawberry-graphql-django==0.30.1
+strawberry-graphql-django==0.31.0
 svgwrite==1.4.3
 tablib==3.5.0
 tzdata==2023.4