udata 9.2.5.dev32287__py2.py3-none-any.whl → 9.2.5.dev32301__py2.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 udata might be problematic. Click here for more details.

Files changed (25) hide show
  1. udata/commands/fixtures.py +1 -1
  2. udata/core/organization/constants.py +3 -3
  3. udata/migrations/2024-10-30-rename-organization-badges.py +27 -0
  4. udata/static/chunks/{10.dac55d18d0b4ef3cdacf.js → 10.a99bb538cfbadb38dbcb.js} +3 -3
  5. udata/static/chunks/{10.dac55d18d0b4ef3cdacf.js.map → 10.a99bb538cfbadb38dbcb.js.map} +1 -1
  6. udata/static/chunks/{11.4a20a75f827c5a1125c3.js → 11.727465d72948bc466d43.js} +3 -3
  7. udata/static/chunks/{11.4a20a75f827c5a1125c3.js.map → 11.727465d72948bc466d43.js.map} +1 -1
  8. udata/static/chunks/{13.645dd0b7c0b9210f1b56.js → 13.3c8337bec315adcd2700.js} +2 -2
  9. udata/static/chunks/{13.645dd0b7c0b9210f1b56.js.map → 13.3c8337bec315adcd2700.js.map} +1 -1
  10. udata/static/chunks/{17.8e19985c4d12a3b7b0c0.js → 17.cbeb6d95129cad6481c2.js} +2 -2
  11. udata/static/chunks/{17.8e19985c4d12a3b7b0c0.js.map → 17.cbeb6d95129cad6481c2.js.map} +1 -1
  12. udata/static/chunks/{19.825a43c330157e351fca.js → 19.4f7a5b71ef006ac268c1.js} +3 -3
  13. udata/static/chunks/{19.825a43c330157e351fca.js.map → 19.4f7a5b71ef006ac268c1.js.map} +1 -1
  14. udata/static/chunks/{8.5ee0cf635c848abbfc05.js → 8.60610fd40b95ca119141.js} +2 -2
  15. udata/static/chunks/{8.5ee0cf635c848abbfc05.js.map → 8.60610fd40b95ca119141.js.map} +1 -1
  16. udata/static/chunks/{9.df3c36f8d0d210621fbb.js → 9.985935421e62c97a9f86.js} +3 -3
  17. udata/static/chunks/{9.df3c36f8d0d210621fbb.js.map → 9.985935421e62c97a9f86.js.map} +1 -1
  18. udata/static/common.js +1 -1
  19. udata/static/common.js.map +1 -1
  20. {udata-9.2.5.dev32287.dist-info → udata-9.2.5.dev32301.dist-info}/METADATA +2 -1
  21. {udata-9.2.5.dev32287.dist-info → udata-9.2.5.dev32301.dist-info}/RECORD +25 -24
  22. {udata-9.2.5.dev32287.dist-info → udata-9.2.5.dev32301.dist-info}/LICENSE +0 -0
  23. {udata-9.2.5.dev32287.dist-info → udata-9.2.5.dev32301.dist-info}/WHEEL +0 -0
  24. {udata-9.2.5.dev32287.dist-info → udata-9.2.5.dev32301.dist-info}/entry_points.txt +0 -0
  25. {udata-9.2.5.dev32287.dist-info → udata-9.2.5.dev32301.dist-info}/top_level.txt +0 -0
@@ -39,7 +39,7 @@ COMMUNITY_RES_URL = "/api/1/datasets/community_resources"
39
39
  DISCUSSION_URL = "/api/1/discussions"
40
40
 
41
41
 
42
- DEFAULT_FIXTURE_FILE_TAG: str = "v2.0.0"
42
+ DEFAULT_FIXTURE_FILE_TAG: str = "v3.0.0"
43
43
  DEFAULT_FIXTURE_FILE: str = f"https://raw.githubusercontent.com/opendatateam/udata-fixtures/{DEFAULT_FIXTURE_FILE_TAG}/results.json" # noqa
44
44
 
45
45
  DEFAULT_FIXTURES_RESULTS_FILENAME: str = "results.json"
@@ -19,9 +19,9 @@ BIGGEST_LOGO_SIZE = LOGO_SIZES[0]
19
19
 
20
20
  PUBLIC_SERVICE = "public-service"
21
21
  CERTIFIED = "certified"
22
- ASSOCIATION = "Association"
23
- COMPANY = "Company"
24
- LOCAL_AUTHORITY = "Local authority"
22
+ ASSOCIATION = "association"
23
+ COMPANY = "company"
24
+ LOCAL_AUTHORITY = "local-authority"
25
25
 
26
26
  TITLE_SIZE_LIMIT = 350
27
27
  DESCRIPTION_SIZE_LIMIT = 100000
@@ -0,0 +1,27 @@
1
+ """
2
+ This migration renames the organization badges for coherent cases
3
+ """
4
+
5
+ import logging
6
+
7
+ from udata.core.organization.constants import ASSOCIATION, COMPANY, LOCAL_AUTHORITY
8
+ from udata.models import Organization
9
+
10
+ log = logging.getLogger(__name__)
11
+
12
+
13
+ mapping_legacy_to_actual = {
14
+ "Association": ASSOCIATION,
15
+ "Company": COMPANY,
16
+ "Local authority": LOCAL_AUTHORITY,
17
+ }
18
+
19
+
20
+ def migrate(db):
21
+ log.info("Processing Organizations...")
22
+
23
+ for legacy, actual in mapping_legacy_to_actual.items():
24
+ count = Organization.objects(badges__kind=legacy).update(set__badges__S__kind=actual)
25
+ log.info(f"Renamed badge {actual} for {count} Organization objects.")
26
+
27
+ log.info("Done")