Add missing return in helper method
This commit is contained in:
parent
569f8a3823
commit
f660d45349
|
|
@ -18,9 +18,11 @@ class ModuleDoesNotExistException(Exception):
|
|||
|
||||
|
||||
def translate_page(page: Page, locale: Locale):
|
||||
logger.debug(f"translating page {page} for locale {locale}")
|
||||
translated_page = page.copy_for_translation(locale)
|
||||
revision = translated_page.latest_revision
|
||||
translated_page.publish(revision)
|
||||
return translated_page
|
||||
|
||||
|
||||
# todo: make this a django command
|
||||
|
|
@ -73,6 +75,7 @@ def convert_page_to_translation(slug: str, original_slug: str, language_code="en
|
|||
content_block.locale = locale
|
||||
content_block.save()
|
||||
|
||||
logger.debug(f"moving {module} to {translated_topic}")
|
||||
module.move(translated_topic, "last-child")
|
||||
|
||||
return f"Converted page {slug} to be the {language_code} translation of {original_slug}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue