diff --git a/src/ralph/lib/custom_fields/fields.py b/src/ralph/lib/custom_fields/fields.py index c61c48bd65..fa59ffb672 100644 --- a/src/ralph/lib/custom_fields/fields.py +++ b/src/ralph/lib/custom_fields/fields.py @@ -3,7 +3,6 @@ from functools import reduce from typing import Any -from dataclasses import dataclass from django.contrib.contenttypes.fields import ( create_generic_related_manager, GenericRelation @@ -149,10 +148,10 @@ def values_list(self, *fields): ) -@dataclass class RelModel: - model: Any # noqa - field: CustomFieldsWithInheritanceRelation # noqa + def __init__(self, model: Any, field: CustomFieldsWithInheritanceRelation): + self.model = model + self.field = field class ReverseGenericRelatedObjectsWithInheritanceDescriptor: