From 8ba69844215c3ba55087a32f9f3eb75c97cd5f9e Mon Sep 17 00:00:00 2001
From: Georg Krause <mail@georg-krause.net>
Date: Fri, 2 Dec 2022 10:36:28 +0100
Subject: [PATCH] Allow metadata.usage to be None

---
 funkwhale_network/schemas.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/funkwhale_network/schemas.py b/funkwhale_network/schemas.py
index 1878e3c..ec95805 100644
--- a/funkwhale_network/schemas.py
+++ b/funkwhale_network/schemas.py
@@ -113,7 +113,7 @@ class MetadataSchema(marshmallow.Schema):
     nodeName = marshmallow.fields.String(required=True)
     private = marshmallow.fields.Boolean(required=True)
     library = marshmallow.fields.Nested(LibraryMetadataSchema, required=True)
-    usage = marshmallow.fields.Nested(MetadataUsageSchema, required=False)
+    usage = marshmallow.fields.Nested(MetadataUsageSchema, required=False, allow_none=True)
 
     class Meta:
         unknown = marshmallow.EXCLUDE
-- 
GitLab