def _migrate_app(self, app_doc):
        try:
            if app_doc["doc_type"] in ["Application", "Application-Deleted"]:
                migrated_app = self.migrate_app(app_doc)
                if migrated_app:
                    return DocUpdate(migrated_app)
        except Exception, e:
            logger.exception("App {id} not properly migrated".format(id=app_doc['_id']))
            if self.options['failfast']:
                raise e
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/app_manager/management/commands/helpers.py/AppMigrationCommandBase._migrate_app/original