def import_products_async(domain, file_ref_id): importer = SingleExcelImporter(import_products_async, file_ref_id) results = import_products(domain, importer) importer.mark_complete() return { 'messages': results }
def import_products_async(domain, file_ref_id): try: importer = SingleExcelImporter(import_products_async, file_ref_id) except UnknownFileRefException: return { 'messages': { 'errors': [_("Sorry, something went wrong! Please try again and report an " "issue if the problem persists")] } } results = import_products(domain, importer) importer.mark_complete() return { 'messages': results }
def import_products_async(domain, file_ref_id): try: importer = SingleExcelImporter(import_products_async, file_ref_id) except UnknownFileRefException: return { 'messages': { 'errors': [ _("Sorry, something went wrong! Please try again and report an " "issue if the problem persists") ] } } results = import_products(domain, importer) importer.mark_complete() return {'messages': results}