udata 9.1.5.dev31347__py2.py3-none-any.whl → 9.1.5.dev31375__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.
- udata/api_fields.py +3 -2
- udata/tests/api/test_reuses_api.py +5 -0
- {udata-9.1.5.dev31347.dist-info → udata-9.1.5.dev31375.dist-info}/METADATA +2 -1
- {udata-9.1.5.dev31347.dist-info → udata-9.1.5.dev31375.dist-info}/RECORD +8 -8
- {udata-9.1.5.dev31347.dist-info → udata-9.1.5.dev31375.dist-info}/LICENSE +0 -0
- {udata-9.1.5.dev31347.dist-info → udata-9.1.5.dev31375.dist-info}/WHEEL +0 -0
- {udata-9.1.5.dev31347.dist-info → udata-9.1.5.dev31375.dist-info}/entry_points.txt +0 -0
- {udata-9.1.5.dev31347.dist-info → udata-9.1.5.dev31375.dist-info}/top_level.txt +0 -0
udata/api_fields.py
CHANGED
|
@@ -2,6 +2,7 @@ import flask_restx.fields as restx_fields
|
|
|
2
2
|
import mongoengine
|
|
3
3
|
import mongoengine.fields as mongo_fields
|
|
4
4
|
from bson import ObjectId
|
|
5
|
+
from flask_restx.inputs import boolean
|
|
5
6
|
from flask_storage.mongo import ImageField as FlaskStorageImageField
|
|
6
7
|
|
|
7
8
|
import udata.api.fields as custom_restx_fields
|
|
@@ -207,7 +208,7 @@ def generate_fields(**kwargs):
|
|
|
207
208
|
if "type" not in filterable:
|
|
208
209
|
filterable["type"] = str
|
|
209
210
|
if isinstance(field, mongo_fields.BooleanField):
|
|
210
|
-
filterable["type"] =
|
|
211
|
+
filterable["type"] = boolean
|
|
211
212
|
|
|
212
213
|
# We may add more information later here:
|
|
213
214
|
# - type of mongo query to execute (right now only simple =)
|
|
@@ -328,7 +329,7 @@ def generate_fields(**kwargs):
|
|
|
328
329
|
base_query = base_query.search_text(phrase_query)
|
|
329
330
|
|
|
330
331
|
for filterable in filterables:
|
|
331
|
-
if args.get(filterable["key"]):
|
|
332
|
+
if args.get(filterable["key"]) is not None:
|
|
332
333
|
for constraint in filterable["constraints"]:
|
|
333
334
|
if constraint == "objectid" and not ObjectId.is_valid(
|
|
334
335
|
args[filterable["key"]]
|
|
@@ -83,6 +83,11 @@ class ReuseAPITest:
|
|
|
83
83
|
assert len(response.json["data"]) == 1
|
|
84
84
|
assert response.json["data"][0]["id"] == str(featured_reuse.id)
|
|
85
85
|
|
|
86
|
+
response = api.get(url_for("api.reuses", featured="false"))
|
|
87
|
+
assert200(response)
|
|
88
|
+
# Keep only featured reuses (if any)
|
|
89
|
+
data = [reuse for reuse in response.json["data"] if reuse["featured"]]
|
|
90
|
+
assert len(data) == 0 # It did not return any featured reuse
|
|
86
91
|
# filter on topic
|
|
87
92
|
response = api.get(url_for("api.reuses", topic=topic_reuse.topic))
|
|
88
93
|
assert200(response)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: udata
|
|
3
|
-
Version: 9.1.5.
|
|
3
|
+
Version: 9.1.5.dev31375
|
|
4
4
|
Summary: Open data portal
|
|
5
5
|
Home-page: https://github.com/opendatateam/udata
|
|
6
6
|
Author: Opendata Team
|
|
@@ -157,6 +157,7 @@ It is collectively taken care of by members of the
|
|
|
157
157
|
- Add acronym in organization csv catalog [#3134](https://github.com/opendatateam/udata/pull/3134)
|
|
158
158
|
- Limit the number of user suggestions [#3131](https://github.com/opendatateam/udata/pull/3131)
|
|
159
159
|
- Update authlib dependency from 0.14.3 to 1.3.1 [#3135](https://github.com/opendatateam/udata/pull/3135)
|
|
160
|
+
- Fix the boolean filters in the API for the "new system" endpoints [#3139](https://github.com/opendatateam/udata/pull/3139)
|
|
160
161
|
|
|
161
162
|
## 9.1.3 (2024-08-01)
|
|
162
163
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
tasks/__init__.py,sha256=jKwrWhJecOzLqFj2SjOt7yxA4HUB9mD1HMjkKpCnow0,8143
|
|
2
2
|
tasks/helpers.py,sha256=70fS9tI_m0DTWmKx9Zl5-LG-nxdz_ZaPyvvsFkN2r48,1091
|
|
3
3
|
udata/__init__.py,sha256=enNs52eaNpjDjWyix7yBTjNLTYjHdP2jxLdiKyFGvJo,101
|
|
4
|
-
udata/api_fields.py,sha256=
|
|
4
|
+
udata/api_fields.py,sha256=dXrhl_H-r5tj39dNXgmPgkFV2s6PCbRuWN89ZCud6Kw,19306
|
|
5
5
|
udata/app.py,sha256=xjk2D3EgboYBpTwBwdIxd2klt2yMoWMyCrkry5fz0LA,7292
|
|
6
6
|
udata/assets.py,sha256=H5Hrc2vnKM0IFLyWfLXmJ2Kj35w1i8W1D8Cgy8_cUj4,657
|
|
7
7
|
udata/cors.py,sha256=m4_AttmBwUEI_njVJkGDFMCpCD3Tvt9k7xBjuQTDqbU,2987
|
|
@@ -608,7 +608,7 @@ udata/tests/api/test_follow_api.py,sha256=fccgVNfcqET221PPS3p7qzb9hpvbBBUGhV-l4U
|
|
|
608
608
|
udata/tests/api/test_me_api.py,sha256=ZJKGH9fFv-4cSGcYAGd6IJA_PwPjVGIqWNy_DhFA8ms,13827
|
|
609
609
|
udata/tests/api/test_organizations_api.py,sha256=YcO2fWELdmPD4Oc8h5MTrLI-Gfbx16RN4nE14zzKGFw,35049
|
|
610
610
|
udata/tests/api/test_reports_api.py,sha256=fCSz9NwMXBs6cxdXBVVI6y564AtovmZYw3xkgxQ9KE8,6217
|
|
611
|
-
udata/tests/api/test_reuses_api.py,sha256=
|
|
611
|
+
udata/tests/api/test_reuses_api.py,sha256=c3rGGP1r9Hj_cgYWpClAsIo8f0JUv81PuC8mdpOh1sc,19000
|
|
612
612
|
udata/tests/api/test_swagger.py,sha256=eE6La9qdTYTIUFevRVPJgtj17Jq_8uOlsDwzCNR0LL8,760
|
|
613
613
|
udata/tests/api/test_tags_api.py,sha256=36zEBgthVEn6pctJ0kDgPmEaUr-iqRAHeZRcRG2LEXQ,2425
|
|
614
614
|
udata/tests/api/test_topics_api.py,sha256=s4pqHTWl3ly8HQd2YmVclHFrjrf0212u5iDSOTSBbZg,9375
|
|
@@ -697,9 +697,9 @@ udata/translations/pt/LC_MESSAGES/udata.mo,sha256=WpPzAqVd2Onv_kz45ULUySKPLrpjcc
|
|
|
697
697
|
udata/translations/pt/LC_MESSAGES/udata.po,sha256=18Op9RUITewoDRewlOdYzzq6gjsf1lsvepACV1d7zxs,44976
|
|
698
698
|
udata/translations/sr/LC_MESSAGES/udata.mo,sha256=NIYRNhVoETZUvIvWm3cCW7DtMBAnS2vXzZjMF5ZzD_c,28500
|
|
699
699
|
udata/translations/sr/LC_MESSAGES/udata.po,sha256=rQB-4V4WJ7bURj6g2j653vItr5TMHadcLQxec7_fDmg,51545
|
|
700
|
-
udata-9.1.5.
|
|
701
|
-
udata-9.1.5.
|
|
702
|
-
udata-9.1.5.
|
|
703
|
-
udata-9.1.5.
|
|
704
|
-
udata-9.1.5.
|
|
705
|
-
udata-9.1.5.
|
|
700
|
+
udata-9.1.5.dev31375.dist-info/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
|
|
701
|
+
udata-9.1.5.dev31375.dist-info/METADATA,sha256=OTOf8nwsiWOByaMZ55ooDLUpvgTPNepu35c00ucFl4M,130064
|
|
702
|
+
udata-9.1.5.dev31375.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
|
|
703
|
+
udata-9.1.5.dev31375.dist-info/entry_points.txt,sha256=3SKiqVy4HUqxf6iWspgMqH8d88Htk6KoLbG1BU-UddQ,451
|
|
704
|
+
udata-9.1.5.dev31375.dist-info/top_level.txt,sha256=39OCg-VWFWOq4gCKnjKNu-s3OwFlZIu_dVH8Gl6ndHw,12
|
|
705
|
+
udata-9.1.5.dev31375.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|