mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 02:49:21 +02:00
formatted for code readability
This commit is contained in:
parent
736189e22c
commit
16fa86edc9
4 changed files with 56 additions and 39 deletions
|
@ -2244,6 +2244,7 @@ class DraftDomainAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
|||
# If no redirection is needed, return the original response
|
||||
return response
|
||||
|
||||
|
||||
class PublicContactResource(resources.ModelResource):
|
||||
"""defines how each field in the referenced model should be mapped to the corresponding fields in the
|
||||
import/export file"""
|
||||
|
@ -2251,31 +2252,20 @@ class PublicContactResource(resources.ModelResource):
|
|||
class Meta:
|
||||
model = models.PublicContact
|
||||
|
||||
def import_row(
|
||||
self,
|
||||
row,
|
||||
instance_loader,
|
||||
using_transactions=True,
|
||||
dry_run=False,
|
||||
raise_errors=None,
|
||||
**kwargs
|
||||
):
|
||||
def import_row(self, row, instance_loader, using_transactions=True, dry_run=False, raise_errors=None, **kwargs):
|
||||
"""Override kwargs skip_epp_save and set to True"""
|
||||
kwargs['skip_epp_save'] = True
|
||||
kwargs["skip_epp_save"] = True
|
||||
return super().import_row(
|
||||
row,
|
||||
instance_loader,
|
||||
using_transactions=using_transactions,
|
||||
dry_run=dry_run,
|
||||
raise_errors=raise_errors,
|
||||
**kwargs
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def save_instance(
|
||||
self, instance, is_create, using_transactions=True, dry_run=False
|
||||
):
|
||||
"""Override save_instance setting skip_epp_save to True
|
||||
"""
|
||||
def save_instance(self, instance, is_create, using_transactions=True, dry_run=False):
|
||||
"""Override save_instance setting skip_epp_save to True"""
|
||||
self.before_save_instance(instance, using_transactions, dry_run)
|
||||
if self._meta.use_bulk:
|
||||
if is_create:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue