udata 10.0.9.dev33820__py2.py3-none-any.whl → 10.0.9.dev33868__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/core/dataset/api.py +3 -2
- udata/core/dataset/api_fields.py +13 -2
- udata/harvest/api.py +5 -1
- udata/static/chunks/{10.471164b2a9fe15614797.js → 10.8ca60413647062717b1e.js} +3 -3
- udata/static/chunks/{10.471164b2a9fe15614797.js.map → 10.8ca60413647062717b1e.js.map} +1 -1
- udata/static/chunks/{11.83535504cd650ea08f65.js → 11.b6f741fcc366abfad9c4.js} +3 -3
- udata/static/chunks/{11.83535504cd650ea08f65.js.map → 11.b6f741fcc366abfad9c4.js.map} +1 -1
- udata/static/chunks/{13.d9c1735d14038b94c17e.js → 13.2d06442dd9a05d9777b5.js} +2 -2
- udata/static/chunks/{13.d9c1735d14038b94c17e.js.map → 13.2d06442dd9a05d9777b5.js.map} +1 -1
- udata/static/chunks/{17.81c57c0dedf812e43013.js → 17.e8e4caaad5cb0cc0bacc.js} +2 -2
- udata/static/chunks/{17.81c57c0dedf812e43013.js.map → 17.e8e4caaad5cb0cc0bacc.js.map} +1 -1
- udata/static/chunks/{19.df16abde17a42033a7f8.js → 19.f03a102365af4315f9db.js} +3 -3
- udata/static/chunks/{19.df16abde17a42033a7f8.js.map → 19.f03a102365af4315f9db.js.map} +1 -1
- udata/static/chunks/{8.462bb3029de008497675.js → 8.778091d55cd8ea39af6b.js} +2 -2
- udata/static/chunks/{8.462bb3029de008497675.js.map → 8.778091d55cd8ea39af6b.js.map} +1 -1
- udata/static/chunks/{9.07515e5187f475bce828.js → 9.033d7e190ca9e226a5d0.js} +3 -3
- udata/static/chunks/{9.07515e5187f475bce828.js.map → 9.033d7e190ca9e226a5d0.js.map} +1 -1
- udata/static/common.js +1 -1
- udata/static/common.js.map +1 -1
- {udata-10.0.9.dev33820.dist-info → udata-10.0.9.dev33868.dist-info}/METADATA +3 -1
- {udata-10.0.9.dev33820.dist-info → udata-10.0.9.dev33868.dist-info}/RECORD +25 -25
- {udata-10.0.9.dev33820.dist-info → udata-10.0.9.dev33868.dist-info}/LICENSE +0 -0
- {udata-10.0.9.dev33820.dist-info → udata-10.0.9.dev33868.dist-info}/WHEEL +0 -0
- {udata-10.0.9.dev33820.dist-info → udata-10.0.9.dev33868.dist-info}/entry_points.txt +0 -0
- {udata-10.0.9.dev33820.dist-info → udata-10.0.9.dev33868.dist-info}/top_level.txt +0 -0
udata/core/dataset/api.py
CHANGED
|
@@ -54,6 +54,7 @@ from .api_fields import (
|
|
|
54
54
|
license_fields,
|
|
55
55
|
resource_fields,
|
|
56
56
|
resource_type_fields,
|
|
57
|
+
upload_community_fields,
|
|
57
58
|
upload_fields,
|
|
58
59
|
)
|
|
59
60
|
from .constants import RESOURCE_TYPES, UPDATE_FREQUENCIES
|
|
@@ -452,7 +453,7 @@ class UploadNewCommunityResources(UploadMixin, API):
|
|
|
452
453
|
responses={415: "Incorrect file content type", 400: "Upload error"},
|
|
453
454
|
)
|
|
454
455
|
@api.expect(upload_parser)
|
|
455
|
-
@api.marshal_with(
|
|
456
|
+
@api.marshal_with(upload_community_fields, code=201)
|
|
456
457
|
def post(self, dataset):
|
|
457
458
|
"""Upload a new community resource"""
|
|
458
459
|
infos = self.handle_upload(dataset)
|
|
@@ -511,7 +512,7 @@ class ReuploadCommunityResource(ResourceMixin, UploadMixin, API):
|
|
|
511
512
|
"upload_community_resource",
|
|
512
513
|
responses={415: "Incorrect file content type", 400: "Upload error"},
|
|
513
514
|
)
|
|
514
|
-
@api.marshal_with(
|
|
515
|
+
@api.marshal_with(upload_community_fields)
|
|
515
516
|
def post(self, community):
|
|
516
517
|
"""Update the file related to a given community resource"""
|
|
517
518
|
ResourceEditPermission(community).test()
|
udata/core/dataset/api_fields.py
CHANGED
|
@@ -125,7 +125,7 @@ resource_fields = api.model(
|
|
|
125
125
|
"title": fields.String(description="The resource title", required=True),
|
|
126
126
|
"description": fields.Markdown(description="The resource markdown description"),
|
|
127
127
|
"filetype": fields.String(
|
|
128
|
-
description=("Whether the resource is an uploaded file,
|
|
128
|
+
description=("Whether the resource is an uploaded file, a remote file or an API"),
|
|
129
129
|
required=True,
|
|
130
130
|
enum=list(RESOURCE_FILETYPES),
|
|
131
131
|
),
|
|
@@ -236,6 +236,17 @@ community_resource_fields = api.inherit(
|
|
|
236
236
|
},
|
|
237
237
|
)
|
|
238
238
|
|
|
239
|
+
|
|
240
|
+
upload_community_fields = api.inherit(
|
|
241
|
+
"UploadedCommunityResource",
|
|
242
|
+
community_resource_fields,
|
|
243
|
+
{
|
|
244
|
+
"success": fields.Boolean(
|
|
245
|
+
description="Whether the upload succeeded or not.", readonly=True, default=True
|
|
246
|
+
),
|
|
247
|
+
},
|
|
248
|
+
)
|
|
249
|
+
|
|
239
250
|
community_resource_page_fields = api.model(
|
|
240
251
|
"CommunityResourcePage", fields.pager(community_resource_fields)
|
|
241
252
|
)
|
|
@@ -332,7 +343,7 @@ dataset_fields = api.model(
|
|
|
332
343
|
),
|
|
333
344
|
"frequency_date": fields.ISODateTime(
|
|
334
345
|
description=(
|
|
335
|
-
"Next expected update date, you will be notified
|
|
346
|
+
"Next expected update date, you will be notified once that date is reached."
|
|
336
347
|
)
|
|
337
348
|
),
|
|
338
349
|
"harvest": fields.Nested(
|
udata/harvest/api.py
CHANGED
|
@@ -36,7 +36,11 @@ error_fields = api.model(
|
|
|
36
36
|
description="The error creation date", required=True, readonly=True
|
|
37
37
|
),
|
|
38
38
|
"message": fields.String(description="The error short message", required=True),
|
|
39
|
-
"details": fields.
|
|
39
|
+
"details": fields.Raw(
|
|
40
|
+
attribute=lambda o: o.details if admin_permission else None,
|
|
41
|
+
description="Optional details (only for super-admins)",
|
|
42
|
+
readonly=True,
|
|
43
|
+
),
|
|
40
44
|
},
|
|
41
45
|
)
|
|
42
46
|
|