@@ -2415,13 +2415,13 @@ def validate_civ_data_objects_and_execute_linked_task(
24152415 self , * , civ_data_objects , user , linked_task = None
24162416 ):
24172417 for civ_data in civ_data_objects :
2418- self .create_civ (
2418+ self ._update_civ (
24192419 civ_data = civ_data ,
24202420 user = user ,
24212421 linked_task = linked_task ,
24222422 )
24232423
2424- def create_civ (self , * , civ_data , user = None , linked_task = None ):
2424+ def _update_civ (self , * , civ_data , user = None , linked_task = None ):
24252425 if not self .is_editable :
24262426 raise CIVNotEditableException (
24272427 f"{ self } is not editable. CIVs cannot be added or removed from it." ,
@@ -2445,15 +2445,15 @@ def create_civ(self, *, civ_data, user=None, linked_task=None):
24452445 )
24462446
24472447 if ci .super_kind == ci .SuperKind .VALUE :
2448- return self ._create_civ_for_value (
2448+ return self ._update_civ_for_value (
24492449 ci = ci ,
24502450 current_civ = current_civ ,
24512451 new_value = civ_data .value ,
24522452 user = user ,
24532453 linked_task = linked_task ,
24542454 )
24552455 elif ci .super_kind == ci .SuperKind .IMAGE :
2456- return self ._create_civ_for_image (
2456+ return self ._update_civ_for_image (
24572457 ci = ci ,
24582458 current_civ = current_civ ,
24592459 user = user ,
@@ -2464,7 +2464,7 @@ def create_civ(self, *, civ_data, user=None, linked_task=None):
24642464 linked_task = linked_task ,
24652465 )
24662466 elif ci .super_kind == ci .SuperKind .FILE :
2467- return self ._create_civ_for_file (
2467+ return self ._update_civ_for_file (
24682468 ci = ci ,
24692469 current_civ = current_civ ,
24702470 file_civ = civ_data .file_civ ,
@@ -2476,7 +2476,7 @@ def create_civ(self, *, civ_data, user=None, linked_task=None):
24762476 f"Unknown interface super kind: { ci .super_kind } "
24772477 )
24782478
2479- def _create_civ_for_value (
2479+ def _update_civ_for_value (
24802480 self , * , ci , current_civ , new_value , user , linked_task = None
24812481 ):
24822482 current_value = current_civ .value if current_civ else None
@@ -2512,7 +2512,7 @@ def _create_civ_for_value(
25122512 if linked_task is not None :
25132513 on_commit (signature (linked_task ).apply_async )
25142514
2515- def _create_civ_for_image ( # noqa: C901
2515+ def _update_civ_for_image ( # noqa: C901
25162516 self ,
25172517 * ,
25182518 ci ,
@@ -2624,7 +2624,7 @@ def _create_civ_for_image( # noqa: C901
26242624 else :
26252625 raise NotImplementedError
26262626
2627- def _create_civ_for_file (
2627+ def _update_civ_for_file (
26282628 self ,
26292629 * ,
26302630 ci ,
0 commit comments