Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix codeclimate issues
oldPadavan724fb37e6c4f
diff --git a/saleor/core/templatetags/status.py b/saleor/core/templatetags/status.pyindex d42ae9b3cd..8d14dcb758 100644--- a/saleor/core/templatetags/status.py+++ b/saleor/core/templatetags/status.py@@ -1,5 +1,3 @@-import datetime-from django.template import Libraryfrom payments import PaymentStatusdiff --git a/saleor/dashboard/menu/views.py b/saleor/dashboard/menu/views.pyindex 368f5069eb..dd278e5ea3 100644--- a/saleor/dashboard/menu/views.py+++ b/saleor/dashboard/menu/views.py@@ -225,12 +225,15 @@ def ajax_menu_links(request):Response format is that of a Select2 JS widget."""+ def get_obj_text(obj):+ return str(obj) + ('' if obj.is_published else pgettext(+ 'Menu item pubslished status', ' (Not published)'))+def get_obj_repr(obj):obj_id = str(obj.pk) + '_' + obj.__class__.__name__return {'id': obj_id,- 'text': str(obj) + ('' if obj.is_published else pgettext(- 'Menu item pubslished status', ' (Not published)'))}+ 'text': get_obj_text(obj)}def get_group_repr(model, label, filter_fields, query):queryset = model.objects.all()