udata 12.0.2.dev15__py3-none-any.whl → 12.0.2.dev16__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/forms.py +2 -0
- udata/tests/api/test_datasets_api.py +12 -0
- {udata-12.0.2.dev15.dist-info → udata-12.0.2.dev16.dist-info}/METADATA +1 -1
- {udata-12.0.2.dev15.dist-info → udata-12.0.2.dev16.dist-info}/RECORD +8 -8
- {udata-12.0.2.dev15.dist-info → udata-12.0.2.dev16.dist-info}/WHEEL +0 -0
- {udata-12.0.2.dev15.dist-info → udata-12.0.2.dev16.dist-info}/entry_points.txt +0 -0
- {udata-12.0.2.dev15.dist-info → udata-12.0.2.dev16.dist-info}/licenses/LICENSE +0 -0
- {udata-12.0.2.dev15.dist-info → udata-12.0.2.dev16.dist-info}/top_level.txt +0 -0
udata/core/dataset/forms.py
CHANGED
|
@@ -116,6 +116,8 @@ class CommunityResourceForm(BaseResourceForm):
|
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
def unmarshal_frequency(form, field):
|
|
119
|
+
if field.data is None:
|
|
120
|
+
return
|
|
119
121
|
# We don't need to worry about invalid field.data being fed to UpdateFrequency here,
|
|
120
122
|
# since the API will already have ensured incoming data matches the field definition,
|
|
121
123
|
# which in our case is an enum of valid UpdateFrequency values.
|
|
@@ -741,6 +741,18 @@ class DatasetAPITest(APITestCase):
|
|
|
741
741
|
self.assertEqual(Dataset.objects.count(), 1)
|
|
742
742
|
self.assertEqual(Dataset.objects.first().description, "new description")
|
|
743
743
|
|
|
744
|
+
def test_dataset_api_update_with_null_frequency(self):
|
|
745
|
+
"""It should update the item even though internal frequency is null"""
|
|
746
|
+
user = self.login()
|
|
747
|
+
dataset = DatasetFactory(owner=user, frequency=None)
|
|
748
|
+
data = dataset.to_dict()
|
|
749
|
+
# Update doesn't matter as long as we don't touch `frequency`
|
|
750
|
+
data["tags"] = ["test"]
|
|
751
|
+
response = self.put(url_for("api.dataset", dataset=dataset), data)
|
|
752
|
+
self.assert200(response)
|
|
753
|
+
self.assertEqual(Dataset.objects.count(), 1)
|
|
754
|
+
self.assertEqual(Dataset.objects.first().frequency, None)
|
|
755
|
+
|
|
744
756
|
def test_dataset_api_update_valid_frequency(self):
|
|
745
757
|
"""It should update a dataset from the API"""
|
|
746
758
|
user = self.login()
|
|
@@ -101,7 +101,7 @@ udata/core/dataset/csv.py,sha256=mNU5cuuNzrMgFF7Z0AKN8clsv458tpJHX1_pzAjpd-4,365
|
|
|
101
101
|
udata/core/dataset/events.py,sha256=bSM0nFEX14r4JHc-bAM-7OOuD3JAxUIpw9GgXbOsUyw,4078
|
|
102
102
|
udata/core/dataset/exceptions.py,sha256=uKiayLSpSzsnLvClObS6hOO0qXEqvURKN7_w8eimQNU,498
|
|
103
103
|
udata/core/dataset/factories.py,sha256=tb18axsk8Tx5iUIqWM9IELdt-2Ryp2UN0-iY4fdea4U,9059
|
|
104
|
-
udata/core/dataset/forms.py,sha256=
|
|
104
|
+
udata/core/dataset/forms.py,sha256=rd4M86QtRFa9laxJGAszgzzrcg4EBGrf-p3HwrxO80I,7126
|
|
105
105
|
udata/core/dataset/metrics.py,sha256=s8Xs_rqRXfNWsErkiJTuRMG5o_cU5iSK8mUJFKVSc7w,1204
|
|
106
106
|
udata/core/dataset/models.py,sha256=1iXf6l0wjNv04if6gAq-NXSPLub2Mx2KOyCg2RQtids,41617
|
|
107
107
|
udata/core/dataset/permissions.py,sha256=zXQ6kU-Ni3Pl5tDtat-ZPupug9InsNeCN7xRLc2Vcrc,1097
|
|
@@ -517,7 +517,7 @@ udata/tests/api/test_auth_api.py,sha256=Mue5EneRp3MbD-ahcXI3YaRNYPcxzHMw-hYpY0Rt
|
|
|
517
517
|
udata/tests/api/test_base_api.py,sha256=2w_vz0eEuq3P3aN-ByvxGc3VZAo7XtgatFfcrzf2uEU,2244
|
|
518
518
|
udata/tests/api/test_contact_points.py,sha256=Sbb486RTN7HVycna_XB60OnURPSNc7xUity26XsYA4k,8766
|
|
519
519
|
udata/tests/api/test_dataservices_api.py,sha256=pB7Kpf0qLhsX4z5hYj3BykYKauEMpESWmrlLlxTOmWw,29221
|
|
520
|
-
udata/tests/api/test_datasets_api.py,sha256=
|
|
520
|
+
udata/tests/api/test_datasets_api.py,sha256=ue-7E5nDg4y4votl8O4xXuIuXGDgu35uwhvD5f_6fJI,106539
|
|
521
521
|
udata/tests/api/test_fields.py,sha256=OW85Z5MES5HeWOpapeem8OvR1cIcrqW-xMWpdZO4LZ8,1033
|
|
522
522
|
udata/tests/api/test_follow_api.py,sha256=4nFXG5pZ_Hf2PJ4KEdHJX_uggjc9RpB8v0fidkAcw9I,5792
|
|
523
523
|
udata/tests/api/test_me_api.py,sha256=YPd8zmR3zwJKtpSqz8nY1nOOMyXs66INeBwyhg5D0Us,13846
|
|
@@ -625,9 +625,9 @@ udata/translations/pt/LC_MESSAGES/udata.mo,sha256=nv80xZLfIfUsSOMBcr29L268FDc_Gt
|
|
|
625
625
|
udata/translations/pt/LC_MESSAGES/udata.po,sha256=bUp-7Ray8t8ALgJk3Icw1jmiGIc9_pEJQHiGw_2EU2o,50989
|
|
626
626
|
udata/translations/sr/LC_MESSAGES/udata.mo,sha256=Y_XpUxD074wXc63oJTnoVOyOQ2lmBxl-MrgluZ0Qdw4,27961
|
|
627
627
|
udata/translations/sr/LC_MESSAGES/udata.po,sha256=qh8mrz9AFuVQtXYSSP4QWsXLM_Lv3EHVifHT1NflWXY,57529
|
|
628
|
-
udata-12.0.2.
|
|
629
|
-
udata-12.0.2.
|
|
630
|
-
udata-12.0.2.
|
|
631
|
-
udata-12.0.2.
|
|
632
|
-
udata-12.0.2.
|
|
633
|
-
udata-12.0.2.
|
|
628
|
+
udata-12.0.2.dev16.dist-info/licenses/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
|
|
629
|
+
udata-12.0.2.dev16.dist-info/METADATA,sha256=8PetONVaBJc2GS-m_tYC4dMuGlLomj19Dw_BRlGOCxs,5174
|
|
630
|
+
udata-12.0.2.dev16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
631
|
+
udata-12.0.2.dev16.dist-info/entry_points.txt,sha256=v2u12qO11i2lyLNIp136WmLJ-NHT-Kew3Duu8J-AXPM,614
|
|
632
|
+
udata-12.0.2.dev16.dist-info/top_level.txt,sha256=EF6CE6YSHd_og-8LCEA4q25ALUpWVe8D0okOLdMAE3A,6
|
|
633
|
+
udata-12.0.2.dev16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|