Skip to content

Commit 580313d

Browse files
committed
Fix liquidated status and bring back L10N
1 parent 01e4eb2 commit 580313d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/ralph/admin/filters.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,11 @@ def choices(self, cl):
560560

561561
def queryset(self, request, queryset):
562562
if not self.value():
563-
liquidated_status = self.model._meta.get_field(
564-
"status"
565-
).choices.liquidated.id
563+
liquidated_status = [
564+
k
565+
for (k, v) in self.model._meta.get_field("status").choices
566+
if v == self.parameter_name
567+
][0]
566568
queryset = queryset.exclude(status=liquidated_status)
567569

568570
return queryset

src/ralph/settings/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def _gen():
205205
LOCALE_PATHS = (os.path.join(BASE_DIR, "locale"),)
206206
TIME_ZONE = "Europe/Warsaw"
207207
USE_I18N = bool_from_env("USE_I18N", True)
208+
USE_L10N = bool_from_env("USE_L10N", True)
208209
USE_TZ = False
209210

210211
STATIC_URL = "/static/"

0 commit comments

Comments
 (0)