@@ -368,8 +368,8 @@ def get_form(self, model):
368368 "Meta" : meta ,
369369 "__module__" : "database.forms" ,
370370 "_errors" : None ,
371- "custom_fields " : {},
372- "custom_field_groups " : {},
371+ "custom_object_type_fields " : {},
372+ "custom_object_type_field_groups " : {},
373373 }
374374
375375 for field in self .object .custom_object_type .fields .all ().order_by ('group_name' , 'weight' , 'name' ):
@@ -379,13 +379,13 @@ def get_form(self, model):
379379 attrs [field_name ] = field_type .get_annotated_form_field (field )
380380
381381 # Annotate the field in the list of CustomField form fields
382- attrs ["custom_fields " ][field_name ] = field
382+ attrs ["custom_object_type_fields " ][field_name ] = field
383383
384384 # Group fields by group_name (similar to NetBox custom fields)
385385 group_name = field .group_name or None # Use None for ungrouped fields
386- if group_name not in attrs ["custom_field_groups " ]:
387- attrs ["custom_field_groups " ][group_name ] = []
388- attrs ["custom_field_groups " ][group_name ].append (field_name )
386+ if group_name not in attrs ["custom_object_type_field_groups " ]:
387+ attrs ["custom_object_type_field_groups " ][group_name ] = []
388+ attrs ["custom_object_type_field_groups " ][group_name ].append (field_name )
389389
390390 except NotImplementedError :
391391 print (f"get_form: { field .name } field is not supported" )
@@ -394,8 +394,8 @@ def get_form(self, model):
394394 def custom_init (self , * args , ** kwargs ):
395395 super (form_class , self ).__init__ (* args , ** kwargs )
396396 # Set the grouping info as instance attributes from the outer scope
397- self .custom_fields = attrs ["custom_fields " ]
398- self .custom_field_groups = attrs ["custom_field_groups " ]
397+ self .custom_object_type_fields = attrs ["custom_object_type_fields " ]
398+ self .custom_object_type_field_groups = attrs ["custom_object_type_field_groups " ]
399399
400400 attrs ["__init__" ] = custom_init
401401
0 commit comments