For the SWT app, the default value of the map parameter in metadata.py is an empty list. If the user sets those
parameters during app invocation (for example ?map=S:slate&map=B:bar) then the value of map in the user parameters is a list while in the refined parameters it is a dictionary:
If the user adds no map parameters then there is no map value in the user parameters, but there is a n empty list in the refined parameters (so the refined parameters can be a list or a dictionary).
Then the map value in refined parameters is that same list, which means that it needs to be manually turned into a dictionary before it is used downstream.
Because
For the SWT app, the default value of the map parameter in metadata.py is an empty list. If the user sets those parameters during app invocation (for example
?map=S:slate&map=B:bar
) then the value ofmap
in the user parameters is a list while in the refined parameters it is a dictionary:If the user adds no map parameters then there is no map value in the user parameters, but there is a n empty list in the refined parameters (so the refined parameters can be a list or a dictionary).
If I set the default of map as follows:
Then the map value in refined parameters is that same list, which means that it needs to be manually turned into a dictionary before it is used downstream.
https://github.com/clamsproject/app-swt-detection/blob/e6662c46aa19e4540eccf42c83ecbf07cf9397be/app.py#L101-L112
I don't think there is any hurry in dealing with this, but maybe we can think a little bit about this for the future.
Done when
No response
Additional context
No response