def backwards(self, orm):
        # Convert all fields back to the single-language table.
        for entry in orm['fluent_blogs.Entry'].objects.all():
            translations = orm['fluent_blogs.Entry_Translation'].objects.filter(master_id=entry.id)
            try:
                # Try default translation
                translation = translations.get(language_code=appsettings.FLUENT_BLOGS_DEFAULT_LANGUAGE_CODE)
            except __HOLE__:
                try:
                    # Try internal fallback
                    translation = translations.get(language_code__in=('en-us', 'en'))
                except ObjectDoesNotExist:
                    # Hope there is a single translation
                    translation = translations.get()

            entry.title = translation.title
            entry.slug = translation.slug
            entry.intro = translation.intro
            entry.save()   # As intended: doesn't call Entry.save() but Model.save() only.
dataset/ETHPy150Open edoburu/django-fluent-blogs/fluent_blogs/south_migrations/0004_migrate_translated_fields.py/Migration.backwards