territories-dashboard-lib 0.1.17__py3-none-any.whl → 0.1.19__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of territories-dashboard-lib might be problematic. Click here for more details.

@@ -44,12 +44,13 @@ def get_territory_meshes(territory_id: str, territory_mesh: MeshLevel):
44
44
  MeshLevel.Town,
45
45
  ]:
46
46
  current_com = row["com_name"]
47
- return {
47
+ territory_meshes = {
48
48
  MeshLevel.Region: current_reg,
49
49
  MeshLevel.Department: current_dep,
50
50
  MeshLevel.Epci: current_epci,
51
51
  MeshLevel.Town: current_com,
52
52
  }
53
+ return territory_meshes
53
54
 
54
55
 
55
56
  def make_filter(dashboard: Dashboard, territory_id: str, territory_mesh: MeshLevel):
@@ -60,6 +61,7 @@ def make_filter(dashboard: Dashboard, territory_id: str, territory_mesh: MeshLev
60
61
  for f in dashboard.filters.all():
61
62
  value = territory_meshes.get(f.mesh)
62
63
  if value:
64
+ value = value.replace("'", "!'") # RISON escape
63
65
  filter_string = f"""NATIVE_FILTER-{f.superset_id}:(__cache:(label:'{value}',validateStatus:!f,value:!('{value}')),extraFormData:(filters:!((col:{f.superset_col},op:IN,val:!('{value}')))),filterState:(label:'{value}',validateStatus:!f,value:!('{value}')),id:NATIVE_FILTER-{f.superset_id},ownState:())"""
64
66
  filters.append(filter_string)
65
67
  if not filters:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: territories-dashboard-lib
3
- Version: 0.1.17
3
+ Version: 0.1.19
4
4
  Summary: Librairie pour la visualisation d'indicateurs territoriaux.
5
5
  Author-email: Bastien <bastien@prune.sh>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -35,7 +35,7 @@ territories_dashboard_lib/indicators_lib/query/utils.py,sha256=nCeQCLzfq35KZzun9
35
35
  territories_dashboard_lib/superset_lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  territories_dashboard_lib/superset_lib/admin.py,sha256=3Yj3PjCd-jC0g4uMNmah-OST-yoE7DDEzJkx2kWlrXg,563
37
37
  territories_dashboard_lib/superset_lib/guest_token.py,sha256=smsl11NS2Sgsuz5UJlvI_lDaBi6Fj9rdpSVmuUol8Fs,2300
38
- territories_dashboard_lib/superset_lib/logic.py,sha256=t3Fl4trVOX9tPeAZTerraHvWGzzV5mml8ZQTsas51AI,2391
38
+ territories_dashboard_lib/superset_lib/logic.py,sha256=vVzSimSlrwefVVdEf2dMr83MW2c_yB4k2uw_Szu_nHg,2492
39
39
  territories_dashboard_lib/superset_lib/models.py,sha256=D_IKcYggr8OeH4Gc9KxmU0ArQ3lq8DFN-e0JDQs9Dng,2613
40
40
  territories_dashboard_lib/superset_lib/serializers.py,sha256=k5DcdwN-k5w9dPchiyxBZtG3BAULp8c00JTO3DR6rA4,250
41
41
  territories_dashboard_lib/superset_lib/urls.py,sha256=URXJLciWDTlzU7gIymlK0nWwAm3Iq8bMkhO0P7RwMuk,254
@@ -173,8 +173,8 @@ territories_dashboard_lib/website_lib/templates/territories_dashboard_lib/websit
173
173
  territories_dashboard_lib/website_lib/templates/territories_dashboard_lib/website/svg/delete-back.svg,sha256=fJPjkZT2jdTcW2nmwr7YtBayOmQKOxiGNyO8bM8jP2U,618
174
174
  territories_dashboard_lib/website_lib/templatetags/htmlparams.py,sha256=jWXlmT-nFh7YefVP_zJSXEA1YgT37wnWqelPhmj7UoM,2092
175
175
  territories_dashboard_lib/website_lib/templatetags/other_filters.py,sha256=EEczSQi8lJZ_rfceuXQz3iF1SIxh5d-3-liTY8lkKtU,944
176
- territories_dashboard_lib-0.1.17.dist-info/licenses/licence.md,sha256=9Tat8mM_Yyww-wmWps8avlOhzumqEUGYy8853tKy7aE,7804
177
- territories_dashboard_lib-0.1.17.dist-info/METADATA,sha256=3UhSwUedYNcNhJy0-W4joZWGw3tk_pwsgO3v1juC3ys,6191
178
- territories_dashboard_lib-0.1.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
179
- territories_dashboard_lib-0.1.17.dist-info/top_level.txt,sha256=Cih-lil8CSXTpDZV6fgHKIKIBtUjDaNpmkiuW2TSzsk,26
180
- territories_dashboard_lib-0.1.17.dist-info/RECORD,,
176
+ territories_dashboard_lib-0.1.19.dist-info/licenses/licence.md,sha256=9Tat8mM_Yyww-wmWps8avlOhzumqEUGYy8853tKy7aE,7804
177
+ territories_dashboard_lib-0.1.19.dist-info/METADATA,sha256=bPm6D_xw0kDA27Xwz6BVUN5vnPre9jWiqXmz_7UJtNo,6191
178
+ territories_dashboard_lib-0.1.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
179
+ territories_dashboard_lib-0.1.19.dist-info/top_level.txt,sha256=Cih-lil8CSXTpDZV6fgHKIKIBtUjDaNpmkiuW2TSzsk,26
180
+ territories_dashboard_lib-0.1.19.dist-info/RECORD,,