Skip to content

Commit 8feebf1

Browse files
committed
fix ValueError in tests
1 parent 2220016 commit 8feebf1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

categories/fields.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@ class CategoryM2MField(ManyToManyField):
77
"""A many to many field to a Category model."""
88

99
def __init__(self, **kwargs):
10-
from .models import Category
11-
1210
if "to" in kwargs:
1311
kwargs.pop("to")
14-
super(CategoryM2MField, self).__init__(to=Category, **kwargs)
12+
super(CategoryM2MField, self).__init__(to="categories.Category", **kwargs)
1513

1614

1715
class CategoryFKField(ForeignKey):
1816
"""A foreign key to the Category model."""
1917

2018
def __init__(self, **kwargs):
21-
from .models import Category
22-
2319
if "to" in kwargs:
2420
kwargs.pop("to")
25-
super(CategoryFKField, self).__init__(to=Category, **kwargs)
21+
super(CategoryFKField, self).__init__(to="categories.Category", **kwargs)

0 commit comments

Comments
 (0)