You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally in a RapidPro Org, it has a map with a single country as level 0, so the states are with level 1 and cities with level 2. In our infrastructure we have some customers who have the need to contain several countries in one Rapidpro Org, in this case, the union of all countries on the map would be level 0, a specific country would be level 1, and then level 2 would be for states or districts.
Several of our U-Report instances can use a single API-Token from a RapidPro Org. So for each country where the map in Rapidpro represents level 1, can make the selection of the map using the "Limit States" filter, however, when using this limit, the query returns only the information that is at the level 1 (countries in this case), without state details (in this case, level 2). We need to list the states contained in the country limited (level 1), that is, list all those that have level 2 and that are children of the country specified by the "Limit States".
To solve this, we can add a new field for Org in settings_common.py, it would be required=False after that, to query the data in the render_to_response method, in ureport.public.views.BoundaryView, making 1 a value default, it would be used on line 488, representing the level value to be filtered, example:
ureport.public.views.BoundaryView.render_to_response line 488
Normally in a RapidPro Org, it has a map with a single country as level 0, so the states are with level 1 and cities with level 2. In our infrastructure we have some customers who have the need to contain several countries in one Rapidpro Org, in this case, the union of all countries on the map would be level 0, a specific country would be level 1, and then level 2 would be for states or districts.
Several of our U-Report instances can use a single API-Token from a RapidPro Org. So for each country where the map in Rapidpro represents level 1, can make the selection of the map using the "Limit States" filter, however, when using this limit, the query returns only the information that is at the level 1 (countries in this case), without state details (in this case, level 2). We need to list the states contained in the country limited (level 1), that is, list all those that have level 2 and that are children of the country specified by the "Limit States".
To solve this, we can add a new field for Org in
settings_common.py
, it would berequired=False
after that, to query the data in therender_to_response
method, inureport.public.views.BoundaryView
, making 1 a value default, it would be used on line 488, representing the level value to be filtered, example:ureport.public.views.BoundaryView.render_to_response
line 488The text was updated successfully, but these errors were encountered: