From a332b984f0fd8f030627b9ec24c8c1567736f76e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Dlouh=C3=BD?= Date: Fri, 13 Mar 2020 20:02:38 +0100 Subject: [PATCH] fix ValueError in tests --- categories/fields.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/categories/fields.py b/categories/fields.py index 1926de95..e5ed3be5 100644 --- a/categories/fields.py +++ b/categories/fields.py @@ -3,18 +3,16 @@ class CategoryM2MField(ManyToManyField): def __init__(self, **kwargs): - from .models import Category if 'to' in kwargs: kwargs.pop('to') - super(CategoryM2MField, self).__init__(to=Category, **kwargs) + super(CategoryM2MField, self).__init__(to='categories.Category', **kwargs) class CategoryFKField(ForeignKey): def __init__(self, **kwargs): - from .models import Category if 'to' in kwargs: kwargs.pop('to') - super(CategoryFKField, self).__init__(to=Category, **kwargs) + super(CategoryFKField, self).__init__(to='categories.Category', **kwargs) try: