@@ -129,7 +129,7 @@ def _manage_inherited_tags(obj, incoming_inherited_tags, potentially_existing_ta
129129 obj .tags .set (cleaned_tag_list )
130130
131131
132- def _copy_model_util (model_in_database , exclude_fields : list [str ] | None = None ):
132+ def copy_model_util (model_in_database , exclude_fields : list [str ] | None = None ):
133133 if exclude_fields is None :
134134 exclude_fields = []
135135 new_model_instance = model_in_database .__class__ ()
@@ -750,7 +750,7 @@ class NoteHistory(models.Model):
750750 current_editor = models .ForeignKey (Dojo_User , editable = False , null = True , on_delete = models .CASCADE )
751751
752752 def copy (self ):
753- copy = _copy_model_util (self )
753+ copy = copy_model_util (self )
754754 copy .save ()
755755 return copy
756756
@@ -776,7 +776,7 @@ def __str__(self):
776776 return self .entry
777777
778778 def copy (self ):
779- copy = _copy_model_util (self )
779+ copy = copy_model_util (self )
780780 # Save the necessary ManyToMany relationships
781781 old_history = list (self .history .all ())
782782 # Save the object before setting any ManyToMany relationships
@@ -801,7 +801,7 @@ def delete(self, *args, **kwargs):
801801 storage .delete (path )
802802
803803 def copy (self ):
804- copy = _copy_model_util (self )
804+ copy = copy_model_util (self )
805805 # Add unique modifier to file name
806806 copy .title = f"{ self .title } - clone-{ str (uuid4 ())[:8 ]} "
807807 # Create new unique file name
@@ -1581,7 +1581,7 @@ def get_absolute_url(self):
15811581 return reverse ("view_engagement" , args = [str (self .id )])
15821582
15831583 def copy (self ):
1584- copy = _copy_model_util (self )
1584+ copy = copy_model_util (self )
15851585 # Save the necessary ManyToMany relationships
15861586 old_notes = list (self .notes .all ())
15871587 old_files = list (self .files .all ())
@@ -1699,7 +1699,7 @@ def __str__(self):
16991699 return f"'{ self .finding } ' on '{ self .endpoint } '"
17001700
17011701 def copy (self , finding = None ):
1702- copy = _copy_model_util (self )
1702+ copy = copy_model_util (self )
17031703 current_endpoint = self .endpoint
17041704 if finding :
17051705 copy .finding = finding
@@ -2161,7 +2161,7 @@ def get_breadcrumbs(self):
21612161 return bc
21622162
21632163 def copy (self , engagement = None ):
2164- copy = _copy_model_util (self )
2164+ copy = copy_model_util (self )
21652165 # Save the necessary ManyToMany relationships
21662166 old_notes = list (self .notes .all ())
21672167 old_files = list (self .files .all ())
@@ -2827,7 +2827,7 @@ def get_absolute_url(self):
28272827 return reverse ("view_finding" , args = [str (self .id )])
28282828
28292829 def copy (self , test = None ):
2830- copy = _copy_model_util (self )
2830+ copy = copy_model_util (self )
28312831 # Save the necessary ManyToMany relationships
28322832 old_notes = list (self .notes .all ())
28332833 old_files = list (self .files .all ())
@@ -3804,7 +3804,7 @@ def engagement(self):
38043804 return None
38053805
38063806 def copy (self , engagement = None ):
3807- copy = _copy_model_util (self )
3807+ copy = copy_model_util (self )
38083808 # Save the necessary ManyToMany relationships
38093809 old_notes = list (self .notes .all ())
38103810 old_accepted_findings_hash_codes = [finding .hash_code for finding in self .accepted_findings .all ()]
0 commit comments