Closed aamadou closed 10 months ago
why loop through important_fields never heard of that, I would just do something like this:
class Configuration:
def __init__(self, models: List[Tuple[Model, List[str]]]):
self.models = models`
def run_checks(self):
for model, fields in self.models:
for obj in model.objects.all():
for field in fields:
value = getattr(obj, field)
# Perform checks on the value
# ...
please merge on develop branch before, and we need to fix tests otherwise pr merge feature is disabled