From 2c4a44d28dfcddbafed6fbba346b400b930c97b8 Mon Sep 17 00:00:00 2001 From: nutrina Date: Thu, 16 May 2024 13:42:58 +0300 Subject: [PATCH] feat(api): updating data_model/models.py, key was removed (#596) * feat(api): updating data_model/models.py, key was removed * feat(api): update admin for data_model --- api/data_model/admin.py | 6 ++++-- api/data_model/models.py | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/data_model/admin.py b/api/data_model/admin.py index f8675b3f3..86ee18e98 100644 --- a/api/data_model/admin.py +++ b/api/data_model/admin.py @@ -7,7 +7,8 @@ @admin.register(Cache) class CacheAdmin(ScorerModelAdmin): list_display = [ - "key", + "key_0", + "key_1", "value", "updated_at", ] @@ -15,7 +16,8 @@ class CacheAdmin(ScorerModelAdmin): list_filter = [] search_fields = [ - "key", + "key_0", + "key_1", "value", ] search_help_text = "Search by: " + ", ".join(search_fields) diff --git a/api/data_model/models.py b/api/data_model/models.py index 55396d285..dd3ae90e1 100644 --- a/api/data_model/models.py +++ b/api/data_model/models.py @@ -10,7 +10,6 @@ class Cache(models.Model): - key = models.JSONField(blank=True, null=True) value = models.JSONField() updated_at = models.DateTimeField() id = models.BigAutoField(primary_key=True)