Repository: VNG-Realisatie/vng-api-common (language: python)

Issue:
Fix/lege waarde kenmerken notificatie
Kenmerken in notificaties can sometimes have values that are empty (i.e., ""). Currently this isn't allowed but it should be.


Discussion / hints:
# [Codecov](https://codecov.io/gh/VNG-Realisatie/vng-api-common/pull/186?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VNG+Realisatie) Report
> Merging [#186](https://codecov.io/gh/VNG-Realisatie/vng-api-common/pull/186?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VNG+Realisatie) (c16087d) into [stable/1.0.x](https://codecov.io/gh/VNG-Realisatie/vng-api-common/commit/8c4999cc01f52baa5bed3f933d2b05192c27d82a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VNG+Realisatie) (8c4999c) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/VNG-Realisatie/vng-api-common/pull/186/graphs/tree.svg?width=650&height=150&src=pr&token=yMrjUJVnq9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VNG+Realisatie)](https://codecov.io/gh/VNG-Realisatie/vng-api-common/pull/186?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VNG+Realisatie)

```diff
@@              Coverage Diff               @@
##           stable/1.0.x     #186    +/-   ##
==============================================
  Coverage         41.94%   41.94%            
==============================================
  Files                79       79            
  Lines              3350     3350            
  Branches            451      613   +162     
==============================================
  Hits               1405     1405            
  Misses             1886     1886            
  Partials             59       59            
```


| [Impacted Files](https://codecov.io/gh/VNG-Realisatie/vng-api-common/pull/186?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VNG+Realisatie) | Coverage Δ | |
|---|---|---|
| [vng\_api\_common/notifications/api/serializers.py](https://codecov.io/gh/VNG-Realisatie/vng-api-common/pull/186/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VNG+Realisatie#diff-dm5nX2FwaV9jb21tb24vbm90aWZpY2F0aW9ucy9hcGkvc2VyaWFsaXplcnMucHk=) | `100.00% <ø> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/VNG-Realisatie/vng-api-common/pull/186?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VNG+Realisatie).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VNG+Realisatie)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/VNG-Realisatie/vng-api-common/pull/186?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VNG+Realisatie). Last update [8c4999c...c16087d](https://codecov.io/gh/VNG-Realisatie/vng-api-common/pull/186?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VNG+Realisatie). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VNG+Realisatie).


Fix patch:
diff --git a/vng_api_common/notifications/api/serializers.py b/vng_api_common/notifications/api/serializers.py
index dd8a12ea..0772ed8d 100644
--- a/vng_api_common/notifications/api/serializers.py
+++ b/vng_api_common/notifications/api/serializers.py
@@ -50,6 +50,7 @@ class NotificatieSerializer(serializers.Serializer):
             label=_("kenmerk"),
             max_length=1000,
             help_text=_("Een waarde behorende bij de sleutel."),
+            allow_blank=True,
         ),
         help_text=_(
             "Mapping van kenmerken (sleutel/waarde) van de notificatie. De "


Test patch:
diff --git a/vng_api_common/notifications/tests/test_webhook_endpoint.py b/vng_api_common/notifications/tests/test_webhook_endpoint.py
index 9d2607ab..46edfa7e 100644
--- a/vng_api_common/notifications/tests/test_webhook_endpoint.py
+++ b/vng_api_common/notifications/tests/test_webhook_endpoint.py
@@ -40,3 +40,23 @@ def test_receive_nofication(self):
         response = self.client.post(self.url, data)
 
         self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
+
+    def test_receive_nofication_empty_value_kenmerk(self):
+        data = {
+            "kanaal": "zaken",
+            "hoofdObject": "https://zaken-api.vng.cloud/api/v1/zaken/d7a22",
+            "resource": "status",
+            "resourceUrl": "https://zaken-api.vng.cloud/api/v1/statussen/d7a22/721c9",
+            "actie": "create",
+            "aanmaakdatum": "2018-01-01T17:00:00Z",
+            "kenmerken": {
+                "bron": "082096752011",
+                "zaaktype": "https://example.com/api/v1/zaaktypen/5aa5c",
+                "vertrouwelijkeidaanduiding": "openbaar",
+                "omschrijving": "",
+            },
+        }
+
+        response = self.client.post(self.url, data)
+
+        self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)