camptocamp / c2cgeoportal

c2cgeoportal application
http://geomapfish.org
Other
64 stars 46 forks source link

WMTS dimensions is broken if value is an integer #3881

Closed rbovard closed 6 years ago

rbovard commented 6 years ago

Project:

When adding an WMTS v1 layer with an integer as dimensions, the generated query translate the value to undefined:

I think there is an issue with integer values because when trying to convert layers to v2, I have this error:

Converting layerv1.
Traceback (most recent call last):
  File ".build/venv/bin/themev1tov2", line 11, in <module>
    sys.exit(main())
  File ".build/venv/local/lib/python2.7/site-packages/c2cgeoportal/scripts/themev1tov2.py", line 104, in main
    layer_v1tov2(session, layer)
  File ".build/venv/local/lib/python2.7/site-packages/c2cgeoportal/scripts/themev1tov2.py", line 237, in layer_v1tov2
    for name, value in dimensions.items():
AttributeError: 'int' object has no attribute 'items'
rbovard commented 6 years ago

Solved by quoting value: "2015"

sbrunner commented 6 years ago

+1 It's the right way to do it :-)