diff --git a/BrickOwlSharp.Client/BrickOwlClient.cs b/BrickOwlSharp.Client/BrickOwlClient.cs index 39aa1f4..efca5e0 100644 --- a/BrickOwlSharp.Client/BrickOwlClient.cs +++ b/BrickOwlSharp.Client/BrickOwlClient.cs @@ -217,6 +217,11 @@ public async Task CreateInventoryAsync( { Dictionary formData = _ObjectToFormData(newInventory); + if (!newInventory.ColorId.HasValue) + { + formData.Remove("color_id"); + } + var url = new Uri(_baseUri, $"inventory/create").ToString(); NewInventoryResult result = await ExecutePost(url, formData, cancellationToken: cancellationToken); _measureRequest(ResourceType.Inventory, cancellationToken);