File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -234,10 +234,11 @@ def get_random_string(length):
234234def _get_headings (model_class , filter_relations = True ):
235235 headings = []
236236 for field in model_class ._meta .get_fields ():
237- is_many_to_many_field = field .__dict__ .get ('many_to_many' , False )
238- is_many_to_one_field = field .__dict__ .get ('many_to_one' , False )
239- is_one_to_many_field = field .__dict__ .get ('one_to_many' , False )
240- is_one_to_one_field = field .__dict__ .get ('one_to_one' , False )
237+ field_dict = field .__dict__
238+ is_many_to_many_field = field_dict .get ('many_to_many' , False )
239+ is_many_to_one_field = field_dict .get ('many_to_one' , False )
240+ is_one_to_many_field = field_dict .get ('one_to_many' , False )
241+ is_one_to_one_field = field_dict .get ('one_to_one' , False )
241242 if filter_relations and (
242243 is_many_to_many_field or is_many_to_one_field or is_one_to_many_field or is_one_to_one_field ):
243244 continue
You can’t perform that action at this time.
0 commit comments