fix missing blank for geometryfield
This commit is contained in:
parent
1faeda5e8a
commit
81e159047a
1 changed files with 2 additions and 2 deletions
|
@ -34,14 +34,14 @@ shapely_logger = logging.getLogger('shapely.geos')
|
|||
class GeometryField(models.JSONField):
|
||||
default_validators = [validate_geometry]
|
||||
|
||||
def __init__(self, geomtype=None, default=None, null=False, help_text=None):
|
||||
def __init__(self, geomtype=None, default=None, null=False, blank=False, help_text=None):
|
||||
if geomtype == 'polyline':
|
||||
geomtype = 'linestring'
|
||||
if geomtype not in (None, 'polygon', 'multipolygon', 'linestring', 'point'):
|
||||
raise ValueError('GeometryField.geomtype has to be '
|
||||
'None, "polygon", "multipolygon", "linestring" or "point"')
|
||||
self.geomtype = geomtype
|
||||
super().__init__(default=default, null=null, help_text=help_text)
|
||||
super().__init__(default=default, null=null, blank=blank, help_text=help_text)
|
||||
|
||||
def deconstruct(self):
|
||||
name, path, args, kwargs = super().deconstruct()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue