udata 7.0.4.dev27568__py2.py3-none-any.whl → 7.0.4.dev27593__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/discussions/api.py +2 -4
- udata/core/discussions/tasks.py +3 -1
- udata/harvest/backends/base.py +2 -2
- udata/harvest/models.py +1 -1
- udata/harvest/tasks.py +6 -3
- udata/harvest/tests/factories.py +1 -0
- udata/harvest/tests/test_models.py +1 -1
- udata/settings.py +1 -2
- udata/templates/mail/membership_refused.html +1 -1
- udata/templates/mail/membership_request.html +1 -1
- udata/templates/mail/new_member.html +2 -2
- udata/templates/mail/new_member.txt +1 -1
- {udata-7.0.4.dev27568.dist-info → udata-7.0.4.dev27593.dist-info}/METADATA +4 -1
- {udata-7.0.4.dev27568.dist-info → udata-7.0.4.dev27593.dist-info}/RECORD +18 -18
- {udata-7.0.4.dev27568.dist-info → udata-7.0.4.dev27593.dist-info}/LICENSE +0 -0
- {udata-7.0.4.dev27568.dist-info → udata-7.0.4.dev27593.dist-info}/WHEEL +0 -0
- {udata-7.0.4.dev27568.dist-info → udata-7.0.4.dev27593.dist-info}/entry_points.txt +0 -0
- {udata-7.0.4.dev27568.dist-info → udata-7.0.4.dev27593.dist-info}/top_level.txt +0 -0
udata/core/discussions/api.py
CHANGED
|
@@ -14,10 +14,8 @@ from udata.core.user.api_fields import user_ref_fields
|
|
|
14
14
|
from .forms import DiscussionCreateForm, DiscussionCommentForm
|
|
15
15
|
from .models import Message, Discussion
|
|
16
16
|
from .permissions import CloseDiscussionPermission
|
|
17
|
-
from .signals import
|
|
18
|
-
|
|
19
|
-
on_discussion_deleted
|
|
20
|
-
)
|
|
17
|
+
from .signals import on_discussion_deleted
|
|
18
|
+
|
|
21
19
|
|
|
22
20
|
ns = api.namespace('discussions', 'Discussion related operations')
|
|
23
21
|
|
udata/core/discussions/tasks.py
CHANGED
|
@@ -16,8 +16,10 @@ log = get_logger(__name__)
|
|
|
16
16
|
def owner_recipients(discussion):
|
|
17
17
|
if getattr(discussion.subject, 'organization', None):
|
|
18
18
|
return [m.user for m in discussion.subject.organization.members]
|
|
19
|
-
|
|
19
|
+
elif getattr(discussion.subject, 'owner', None):
|
|
20
20
|
return [discussion.subject.owner]
|
|
21
|
+
else:
|
|
22
|
+
return []
|
|
21
23
|
|
|
22
24
|
|
|
23
25
|
@connect(on_new_discussion, by_id=True)
|
udata/harvest/backends/base.py
CHANGED
|
@@ -156,7 +156,7 @@ class BaseBackend(object):
|
|
|
156
156
|
self.job.errors.append(error)
|
|
157
157
|
self.job.status = 'failed'
|
|
158
158
|
self.end()
|
|
159
|
-
return
|
|
159
|
+
return None
|
|
160
160
|
except Exception as e:
|
|
161
161
|
self.job.status = 'failed'
|
|
162
162
|
error = HarvestError(message=safe_unicode(e))
|
|
@@ -164,7 +164,7 @@ class BaseBackend(object):
|
|
|
164
164
|
self.end()
|
|
165
165
|
msg = 'Initialization failed for "{0.name}" ({0.backend})'
|
|
166
166
|
log.exception(msg.format(self.source))
|
|
167
|
-
return
|
|
167
|
+
return None
|
|
168
168
|
|
|
169
169
|
if self.max_items:
|
|
170
170
|
self.job.items = self.job.items[:self.max_items]
|
udata/harvest/models.py
CHANGED
|
@@ -94,7 +94,7 @@ class HarvestSource(db.Owned, db.Document):
|
|
|
94
94
|
populate_from='name', update=True)
|
|
95
95
|
description = db.StringField()
|
|
96
96
|
url = db.StringField(required=True)
|
|
97
|
-
backend = db.StringField()
|
|
97
|
+
backend = db.StringField(required=True)
|
|
98
98
|
config = db.DictField()
|
|
99
99
|
periodic_task = db.ReferenceField('PeriodicTask',
|
|
100
100
|
reverse_delete_rule=db.NULLIFY)
|
udata/harvest/tasks.py
CHANGED
|
@@ -19,15 +19,18 @@ def harvest(self, ident):
|
|
|
19
19
|
Backend = backends.get(current_app, source.backend)
|
|
20
20
|
backend = Backend(source)
|
|
21
21
|
items = backend.perform_initialization()
|
|
22
|
-
if items
|
|
22
|
+
if items is None:
|
|
23
|
+
pass
|
|
24
|
+
elif items == 0:
|
|
25
|
+
backend.finalize()
|
|
26
|
+
else:
|
|
23
27
|
finalize = harvest_job_finalize.s(backend.job.id)
|
|
24
28
|
items = [
|
|
25
29
|
harvest_job_item.s(backend.job.id, item.remote_id)
|
|
26
30
|
for item in backend.job.items
|
|
27
31
|
]
|
|
28
32
|
chord(items)(finalize)
|
|
29
|
-
|
|
30
|
-
backend.finalize()
|
|
33
|
+
|
|
31
34
|
|
|
32
35
|
|
|
33
36
|
@task(ignore_result=False, route='low.harvest')
|
udata/harvest/tests/factories.py
CHANGED
|
@@ -12,7 +12,7 @@ log = logging.getLogger(__name__)
|
|
|
12
12
|
@pytest.mark.usefixtures('clean_db')
|
|
13
13
|
class HarvestSourceTest:
|
|
14
14
|
def test_defaults(self):
|
|
15
|
-
source = HarvestSource.objects.create(name='Test', url=faker.url())
|
|
15
|
+
source = HarvestSource.objects.create(name='Test', url=faker.url(), backend='factory')
|
|
16
16
|
assert source.name == 'Test'
|
|
17
17
|
assert source.slug == 'test'
|
|
18
18
|
|
udata/settings.py
CHANGED
|
@@ -470,8 +470,7 @@ class Testing(object):
|
|
|
470
470
|
WTF_CSRF_ENABLED = False
|
|
471
471
|
AUTO_INDEX = False
|
|
472
472
|
CELERY_TASK_ALWAYS_EAGER = True
|
|
473
|
-
|
|
474
|
-
CELERY_TASK_EAGER_PROPAGATES = False
|
|
473
|
+
CELERY_TASK_EAGER_PROPAGATES = True
|
|
475
474
|
TEST_WITH_PLUGINS = False
|
|
476
475
|
PLUGINS = []
|
|
477
476
|
TEST_WITH_THEME = False
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
{{ _('Congratulations, you are now a member of the organization "%(org)s"',
|
|
8
8
|
org=(
|
|
9
9
|
'<a href="'|safe
|
|
10
|
-
+ url_for(
|
|
10
|
+
+ org.url_for(_external=True)
|
|
11
11
|
+ '">'|safe
|
|
12
12
|
+ org.name
|
|
13
13
|
+ '</a>'|safe
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<td align="center">
|
|
20
20
|
{{ mail_button(
|
|
21
21
|
_('See the organization page'),
|
|
22
|
-
url_for(
|
|
22
|
+
org.url_for(_external=True)
|
|
23
23
|
) }}
|
|
24
24
|
</td>
|
|
25
25
|
</tr>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: udata
|
|
3
|
-
Version: 7.0.4.
|
|
3
|
+
Version: 7.0.4.dev27593
|
|
4
4
|
Summary: Open data portal
|
|
5
5
|
Home-page: https://github.com/opendatateam/udata
|
|
6
6
|
Author: Opendata Team
|
|
@@ -140,6 +140,9 @@ It is collectively taken care of by members of the
|
|
|
140
140
|
- Organization can nom define a custom metadata of a choosen type
|
|
141
141
|
- Dataset belonging to the organization can assign a value to the defined metadata
|
|
142
142
|
- Metadata value must match the choosen type by the organization
|
|
143
|
+
- Fix: do not send mail about discussions when there is no owner / no organisation members [#2962](https://github.com/opendatateam/udata/pull/2962)
|
|
144
|
+
- Fix: 'backend' is now required in `HarvestSource` [#2962](https://github.com/opendatateam/udata/pull/2962)
|
|
145
|
+
- Fix: URL to organizations in mails are now independent from `udata-front` (show the URL of the API if no `udata-front`) [#2962](https://github.com/opendatateam/udata/pull/2962)
|
|
143
146
|
|
|
144
147
|
## 7.0.3 (2024-02-15)
|
|
145
148
|
|
|
@@ -11,7 +11,7 @@ udata/mail.py,sha256=dAMcbEtk5e54alpQezvF5adDrRPgdaT36QEdHD_5v50,2145
|
|
|
11
11
|
udata/rdf.py,sha256=js76f1zsiFt0A9ackhFqjegJonlGpR9QndEnUk0L8Xg,8378
|
|
12
12
|
udata/routing.py,sha256=ztmFx4YzqlEqa-HG9a43WfGYfULC95ZxTlkr4iHkzVQ,7045
|
|
13
13
|
udata/sentry.py,sha256=KiZz0PpmYpZMvykH9UAbHpF4xBY0Q-8DeiEbXEHDUdw,2683
|
|
14
|
-
udata/settings.py,sha256
|
|
14
|
+
udata/settings.py,sha256=1iC7X3HE-H9RnKcscbgaaqDuzy-KtrbvrhznB-rZzw8,16616
|
|
15
15
|
udata/sitemap.py,sha256=pjtR2lU3gRHvK8l1Lw8B9wrqMMTYC5adUfFh0pUp_Q4,977
|
|
16
16
|
udata/tags.py,sha256=8MvgyjfUz8O71tCV0V1fQV4_0C2P-SLFrm2IA2QfNDs,595
|
|
17
17
|
udata/tasks.py,sha256=WR07NfqRMpEBNOnsXZ9myvDDSVfx4R5VZCi3CgO53A8,4886
|
|
@@ -96,7 +96,7 @@ udata/core/dataset/signals.py,sha256=TK6dfrOUitZZkGGOh6XmhYqYvIjzZpI70JTLV4k-JRM
|
|
|
96
96
|
udata/core/dataset/tasks.py,sha256=VB1sQ6Fwbax46IRLGyZUDPGgGOWBYrzAlKzV3npDCyM,8412
|
|
97
97
|
udata/core/discussions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
98
98
|
udata/core/discussions/actions.py,sha256=l8FaRpNdnwq5M7IYA9lh1qhhTlk2XOnYkgt0dLJpowU,789
|
|
99
|
-
udata/core/discussions/api.py,sha256=
|
|
99
|
+
udata/core/discussions/api.py,sha256=YlLxVA3GFcek8Q9Qb-R8KbNza2Ia3a9zNTU9PGewims,8554
|
|
100
100
|
udata/core/discussions/factories.py,sha256=NQd_tD0Izrm67uO5HuuClmluteACrRd9PHrb2IkQ0P0,350
|
|
101
101
|
udata/core/discussions/forms.py,sha256=PJ1z_q2erqG3aoRrbITKeUeuHcUO-iiL1pp7WU2lnb8,806
|
|
102
102
|
udata/core/discussions/metrics.py,sha256=qtgyDhM1aPgh8bGU-h-962EKR3J44imC155JVi6jvJI,362
|
|
@@ -104,7 +104,7 @@ udata/core/discussions/models.py,sha256=McFQrZw3-IlHE_rBlAf1OMOpnT_PHbm4yLPsSvsR
|
|
|
104
104
|
udata/core/discussions/notifications.py,sha256=1lsu8WyyOL4bdt0lx6IW5wTxmQ5gS_7FoncN53g3ToQ,927
|
|
105
105
|
udata/core/discussions/permissions.py,sha256=q3tXNuNmuXCvZhKyudROcwXF53l-IeDR3pfKSh_hIL0,636
|
|
106
106
|
udata/core/discussions/signals.py,sha256=zjuF-TiFwu9U_RcgZtHB2Z3W4oBx5hVZy6CCAl5Ekug,543
|
|
107
|
-
udata/core/discussions/tasks.py,sha256=
|
|
107
|
+
udata/core/discussions/tasks.py,sha256=T_Pi7xgbNH0ulQsxRETZvMIoWikh4QKuwA2jW8rLKBI,2911
|
|
108
108
|
udata/core/followers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
109
109
|
udata/core/followers/api.py,sha256=9777c3RQUNOemQgL5SQI_U6ya4-Mwm8T2hXaXm_B_RM,2601
|
|
110
110
|
udata/core/followers/metrics.py,sha256=nKgoiM2Gu-XHrgEf9duW1My66zFSKbmw25BGqo5wWtY,190
|
|
@@ -255,21 +255,21 @@ udata/harvest/csv.py,sha256=c2fPnMB6q99wRxLncl8L0ILcdF4SI8Lsl8tViNrcW6A,396
|
|
|
255
255
|
udata/harvest/exceptions.py,sha256=YaXw0ESmSCcibfUmP5uc1uRedKD2mvUBXUOnbaSXtNw,299
|
|
256
256
|
udata/harvest/filters.py,sha256=VGSbMLOXQ9ay5GlTvCwN1_EmWX6KEXs-RPcOXo45Q6U,2615
|
|
257
257
|
udata/harvest/forms.py,sha256=AxEFhBACjXVT9X1bSK8WzDAZgWg-hdaWBebFb1ihNYo,3389
|
|
258
|
-
udata/harvest/models.py,sha256
|
|
258
|
+
udata/harvest/models.py,sha256=-C2vlyvQqXyO6COJydGaaob0JOXPGKRMVdrmElHhyfU,5947
|
|
259
259
|
udata/harvest/notifications.py,sha256=aNKUtUl73Caj_kl-ENOEbTX_cgtySqLjHhtH9FEDR9Y,774
|
|
260
260
|
udata/harvest/signals.py,sha256=wlXTi1E7rIVyNvxw0yUqyN5gF3thg276LAOmAF9vDJY,1338
|
|
261
|
-
udata/harvest/tasks.py,sha256=
|
|
261
|
+
udata/harvest/tasks.py,sha256=0VhefKCQJSU_puTpdKOpvt3WORXHAFWGEB-R_MhB12M,1981
|
|
262
262
|
udata/harvest/backends/__init__.py,sha256=qcLhHKWO97TeWd93ZwymG_Cc9FO7sMM7h4fs6XYdtS8,447
|
|
263
|
-
udata/harvest/backends/base.py,sha256=
|
|
263
|
+
udata/harvest/backends/base.py,sha256=oaPQcQ0onIXH5ofUtWH5sM6_5_wSBLawHSOjeeoG6jQ,12258
|
|
264
264
|
udata/harvest/backends/dcat.py,sha256=ll9RWAjoLvnyoI7iviatsJWN5XFRQuYzDeBKlbaHxCc,8702
|
|
265
265
|
udata/harvest/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
266
|
-
udata/harvest/tests/factories.py,sha256=
|
|
266
|
+
udata/harvest/tests/factories.py,sha256=CbQORC1OJ1_Agtv_3LjCXysNumjMYlROwZPSEAHo8sM,2005
|
|
267
267
|
udata/harvest/tests/test_actions.py,sha256=7xSpouCAcf5p_bd38zHCyPN7sKWUUZXA7IlpI-yNVrQ,27603
|
|
268
268
|
udata/harvest/tests/test_api.py,sha256=QXhseHfnkBEmMbIJzroMdDYGLDj6Njal1s-2sn0xhEM,14888
|
|
269
269
|
udata/harvest/tests/test_base_backend.py,sha256=JA8Df1Eu-lEPLZfxyK81bsmT6exOjV_3PtKHJekAp5g,12092
|
|
270
270
|
udata/harvest/tests/test_dcat_backend.py,sha256=rEpwQw07OpnjnZorvWvKyYwnkeTuIETQftLBoPDUksQ,21126
|
|
271
271
|
udata/harvest/tests/test_filters.py,sha256=V2HFZlexIJa6r1DX6g2ktvIgjg4gSY11QPfPOd3_Oug,2370
|
|
272
|
-
udata/harvest/tests/test_models.py,sha256=
|
|
272
|
+
udata/harvest/tests/test_models.py,sha256=p2VazyrPXSArBuf8Kf19TGPcQ86SnOGCGmvjcMOw0s0,924
|
|
273
273
|
udata/harvest/tests/test_notifications.py,sha256=ZwtwioittW3XcZc0x6zbHjs1dVaAxPytlVymnJa5w0E,817
|
|
274
274
|
udata/harvest/tests/test_tasks.py,sha256=OfUnsg6x3DtbS2s3ToRDZY46aqqmbowN1sqASmsLaN4,680
|
|
275
275
|
udata/harvest/tests/csw_dcat/geonetworkv4-page-1.xml,sha256=k2pKidlQvJpoltGFm9HNh6KHai7nrPcpinDSQS4dGkQ,17040
|
|
@@ -486,16 +486,16 @@ udata/templates/mail/discussion_closed.html,sha256=i98g4PPos5GQ_QE6xHma1cchnCWQx
|
|
|
486
486
|
udata/templates/mail/discussion_closed.txt,sha256=ZvEnfsVCAHDzYlzHFCas-Grj_oiVZs3A7X7A2u1ngBs,380
|
|
487
487
|
udata/templates/mail/frequency_reminder.html,sha256=McTRYsUfnvSGNIvov9SDryTlS1LTl8TMMQs_k8fAxh8,1182
|
|
488
488
|
udata/templates/mail/frequency_reminder.txt,sha256=3IDPkrZEGmGm_gULSuYdq7VMKsQe0o5CZWNw8fbxpco,724
|
|
489
|
-
udata/templates/mail/membership_refused.html,sha256=
|
|
489
|
+
udata/templates/mail/membership_refused.html,sha256=KygLjFxJfCL-GRG_Msf6qCJ_Kv_fzFB6AklRIiPOMi0,608
|
|
490
490
|
udata/templates/mail/membership_refused.txt,sha256=rXur42ZD3W65SCblUrZqMK34RHz0oSYL4-rb_kKmE0g,217
|
|
491
|
-
udata/templates/mail/membership_request.html,sha256=
|
|
491
|
+
udata/templates/mail/membership_request.html,sha256=3jRG5Xp6sJNbST3Lc6FGaInjShLrOznA6Cjp6rPilKY,1407
|
|
492
492
|
udata/templates/mail/membership_request.txt,sha256=NBxMyNYUayQC9RbeWiws4JEOm4EpagU_GkPQJZcqKps,462
|
|
493
493
|
udata/templates/mail/new_discussion.html,sha256=itzbuSg-SUJCDA78fFgeEGB2t1cI5nwhfxzJYT0XLJg,1090
|
|
494
494
|
udata/templates/mail/new_discussion.txt,sha256=J1LJXTePrnZsvCLUcUG505SU5mIz0glmJlwcecujap8,403
|
|
495
495
|
udata/templates/mail/new_discussion_comment.html,sha256=BvDL3JV5lOPgPco0n6LTKXFLbYFcRqYFJp_6D_yLmkw,1155
|
|
496
496
|
udata/templates/mail/new_discussion_comment.txt,sha256=gct1ab7BVw2D-FB2D3e1t8oGtKAsvrEcRe36Lm4fr-E,383
|
|
497
|
-
udata/templates/mail/new_member.html,sha256=
|
|
498
|
-
udata/templates/mail/new_member.txt,sha256=
|
|
497
|
+
udata/templates/mail/new_member.html,sha256=z8SY_MCosTz3N8HjxyqF7oFxxofSLJbnQdKfxwq3cz4,740
|
|
498
|
+
udata/templates/mail/new_member.txt,sha256=5eF26j4-BAt7I-U2wkwlTODHFNe91A8N1EdKnWqKPDI,247
|
|
499
499
|
udata/templates/mail/new_reuse.html,sha256=Yb69cb2bb5d9oEdsKUBWQ0scJ5r_WhECJMSyiYabpAo,1366
|
|
500
500
|
udata/templates/mail/new_reuse.txt,sha256=Uhpcp5JccAbSNgT-keiOtwlVe-NaYJiwh9GOCDaBc_c,447
|
|
501
501
|
udata/templates/mail/test.html,sha256=8oNjUUHmBnPZbrar9Qv3hg8jSesTKOqvXO6xqeO6BT0,232
|
|
@@ -646,9 +646,9 @@ udata/translations/pt/LC_MESSAGES/udata.mo,sha256=sbRJJcf9afMBJx3L8qGez5XoILhNMI
|
|
|
646
646
|
udata/translations/pt/LC_MESSAGES/udata.po,sha256=sv-oskJPJ6SStK6TWA-Wa28ssmrJweWLw4M__Sln-_Q,41902
|
|
647
647
|
udata/translations/sr/LC_MESSAGES/udata.mo,sha256=YsXkmamsMG_H0I4tfmP_9JfXxyplpJHxFwIZr6jW9eU,29088
|
|
648
648
|
udata/translations/sr/LC_MESSAGES/udata.po,sha256=QsVYsk6FRVtKmfxKv427qPmYcw2mx_wuE79aaWNeaYA,48743
|
|
649
|
-
udata-7.0.4.
|
|
650
|
-
udata-7.0.4.
|
|
651
|
-
udata-7.0.4.
|
|
652
|
-
udata-7.0.4.
|
|
653
|
-
udata-7.0.4.
|
|
654
|
-
udata-7.0.4.
|
|
649
|
+
udata-7.0.4.dev27593.dist-info/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
|
|
650
|
+
udata-7.0.4.dev27593.dist-info/METADATA,sha256=B0hcXJ4uuYvD7uKqX4yzgsfx7So0PPJjoKjlhMflUIw,116671
|
|
651
|
+
udata-7.0.4.dev27593.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
|
|
652
|
+
udata-7.0.4.dev27593.dist-info/entry_points.txt,sha256=ZqIUHhOth0MMQvMIeuhODbUCDwjR-Hvo7PaKrMwTKuQ,384
|
|
653
|
+
udata-7.0.4.dev27593.dist-info/top_level.txt,sha256=39OCg-VWFWOq4gCKnjKNu-s3OwFlZIu_dVH8Gl6ndHw,12
|
|
654
|
+
udata-7.0.4.dev27593.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|