Remove debug logging and cache

This commit is contained in:
tcely authored and GitHub committed 2025-02-03 09:22:29 -05:00
1 parent 4a5660be8d
commit 724e632814
1 file changed
-7
-7
View File
@@ -1,5 +1,4 @@
from collections import namedtuple
from functools import lru_cache
from typing import Any, Dict
from django import forms
from django.db import connection, models
@@ -143,16 +142,10 @@ class CommaSepChoiceField(models.CharField):
# **kwargs,
# })
@lru_cache(maxsize=10)
def from_db_value(self, value, expression, connection):
'''
Create a data structure to be used in Python code.
This is called quite often with the same input,
because the database value doesn't change often.
So, it's being cached to prevent excessive logging.
'''
self.log.debug(f'fdbv:1: {type(value)} {repr(value)}')
if isinstance(value, str) and len(value) > 0:
value = value.split(self.separator)
if not isinstance(value, list):