ignore invalid rings in svg import
@@ -175,6 +175,8 @@ class Command(BaseCommand):
changed_geometries.reset()
for path in svg.findall('.//svg:path', namespaces):
for polygon in self.parse_svg_data(path.attrib['d']):
+ if len(polygon) < 3:
+ continue
polygon = Polygon(polygon)
polygon = scale(polygon, xfact=1, yfact=-1, origin=(0, svg_height/2))
polygon = scale(polygon, xfact=width / svg_width, yfact=height / svg_height, origin=(0, 0))
