Skip to content

Commit 6c76be9

Browse files
committed
Fixed bug in GeometricZData.from_dict()
1 parent 9b01533 commit 6c76be9

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

highcharts_maps/options/series/data/geometric.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,12 @@ class from a Highcharts Javascript-compatible :class:`dict <python:dict>` object
345345
}
346346

347347
properties = {}
348-
if len(as_dict) > len(kwargs):
349-
for key in as_dict:
350-
if key not in kwargs:
351-
snake_key = utility_functions.to_snake_case(key)
352-
if snake_key not in kwargs:
353-
properties[snake_key] = as_dict[key]
348+
for key in as_dict:
349+
if key in kwargs:
350+
continue
351+
snake_key = utility_functions.to_snake_case(key)
352+
if snake_key not in kwargs:
353+
properties[snake_key] = as_dict[key]
354354

355355
kwargs['properties'] = properties
356356

@@ -473,12 +473,12 @@ class from a Highcharts Javascript-compatible :class:`dict <python:dict>` object
473473
}
474474

475475
properties = {}
476-
if len(as_dict) > len(kwargs):
477-
for key in as_dict:
478-
if key not in kwargs:
479-
snake_key = utility_functions.to_snake_case(key)
480-
if snake_key not in kwargs:
481-
properties[snake_key] = as_dict[key]
476+
for key in as_dict:
477+
if key in kwargs:
478+
continue
479+
snake_key = utility_functions.to_snake_case(key)
480+
if snake_key not in kwargs:
481+
properties[snake_key] = as_dict[key]
482482

483483
kwargs['properties'] = properties
484484

0 commit comments

Comments
 (0)