Skip to content

Commit 2cc9d07

Browse files
committed
Added empty_values to DjangoField
This fixes an error occuring in django >=5.0 See #102 for more details
1 parent e3ce68e commit 2cc9d07

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

django_neomodel/__init__.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
from functools import total_ordering
22

3+
from django.conf import settings
4+
from django.core import validators
5+
from django.core.exceptions import ValidationError
36
from django.db.models import signals
47
from django.db.models.fields import BLANK_CHOICE_DASH
5-
from django.conf import settings
6-
from django.forms import fields as form_fields
78
from django.db.models.options import Options
8-
from django.core.exceptions import ValidationError
9-
10-
from neomodel import RequiredProperty, DeflateError, StructuredNode, UniqueIdProperty
9+
from neomodel import DeflateError, RequiredProperty, StructuredNode, UniqueIdProperty
1110
from neomodel.sync_.core import NodeMeta
1211
from neomodel.sync_.match import NodeSet
1312

14-
1513
__author__ = "Robin Edwards"
1614
__email__ = "[email protected]"
1715
__license__ = "MIT"
@@ -46,6 +44,7 @@ class DjangoField(object):
4644
unique = False
4745
primary_key = False
4846
auto_created = False
47+
empty_values = list(validators.EMPTY_VALUES)
4948

5049
def __init__(self, prop, name):
5150
self.prop = prop

0 commit comments

Comments
 (0)