Skip to content

Commit

Permalink
Remove check if TranslationSource already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ACK1D committed Dec 26, 2023
1 parent 7994406 commit 5448b91
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions wagtail_localize/tests/test_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,6 @@ def setUp(self):
user=self.user, target_locales=self.target_locales
)

# Check if TranslationSource already exists
source, created = TranslationSource.objects.get_or_create(
object_id=self.page.translation_key,
specific_content_type=ContentType.objects.get_for_model(TestPage),
locale=self.page.locale,
)

# If not created, prepare the source
if created:
prepare_source(source)

def test_create_translations_skips_duplicate(self):
# Call create_translations() to check that only one translation has been created
self.translation_creator.create_translations(self.page)
Expand Down

0 comments on commit 5448b91

Please sign in to comment.