Skip to content

Commit 1604b00

Browse files
committed
fix ValueError in tests
1 parent cf24f77 commit 1604b00

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

categories/fields.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33

44
class CategoryM2MField(ManyToManyField):
55
def __init__(self, **kwargs):
6-
from .models import Category
76
if 'to' in kwargs:
87
kwargs.pop('to')
9-
super(CategoryM2MField, self).__init__(to=Category, **kwargs)
8+
super(CategoryM2MField, self).__init__(to='categories.Category', **kwargs)
109

1110

1211
class CategoryFKField(ForeignKey):
1312
def __init__(self, **kwargs):
14-
from .models import Category
1513
if 'to' in kwargs:
1614
kwargs.pop('to')
17-
super(CategoryFKField, self).__init__(to=Category, **kwargs)
15+
super(CategoryFKField, self).__init__(to='categories.Category', **kwargs)
1816

1917

2018
try:

0 commit comments

Comments
 (0)