Skip to content

Commit

Permalink
constraint added for adding sets to inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanstapel committed Jan 22, 2024
1 parent 32c0e83 commit 24d8520
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions BrickOwlSharp.Client/BrickOwlClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@ public async Task<NewInventoryResult> CreateInventoryAsync(
{
Dictionary<string, string> formData = _ObjectToFormData(newInventory);

if (!newInventory.ColorId.HasValue)
{
formData.Remove("color_id");
}

var url = new Uri(_baseUri, $"inventory/create").ToString();
NewInventoryResult result = await ExecutePost<NewInventoryResult>(url, formData, cancellationToken: cancellationToken);
_measureRequest(ResourceType.Inventory, cancellationToken);
Expand Down

0 comments on commit 24d8520

Please sign in to comment.