Skip to content

Commit

Permalink
Fix move item bug introduced in the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
olsh committed Dec 27, 2022
1 parent 2dc4a37 commit f53a1b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Todoist.Net.Tests/Services/ItemsServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void MoveItemsToProject_Success()
client.Items.UpdateAsync(item).Wait();

var project = new Project(Guid.NewGuid().ToString());
client.Projects.AddAsync(project);
client.Projects.AddAsync(project).Wait();

var itemInfo = client.Items.GetAsync(item.Id).Result;

Expand Down Expand Up @@ -193,7 +193,7 @@ public void CreateNewItem_DueDateIsLocal_DueDateNotChanged()

var itemInfo = client.Items.GetAsync(taskId).Result;

Assert.Equal(item.DueDate.Date, itemInfo.Item.DueDate.Date.Value.ToLocalTime());
Assert.Equal(item.DueDate.Date, itemInfo.Item.DueDate.Date?.ToLocalTime());

client.Items.DeleteAsync(item.Id).Wait();
}
Expand Down
7 changes: 6 additions & 1 deletion src/Todoist.Net/Models/ItemMoveArgument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Todoist.Net.Models
/// Represents a item move argument.
/// </summary>
/// <seealso cref="Todoist.Net.Models.MoveArgument" />
public class ItemMoveArgument : MoveArgument
public class ItemMoveArgument : BaseEntity
{
internal ItemMoveArgument()
{
Expand All @@ -30,6 +30,11 @@ internal ItemMoveArgument()
[JsonProperty("section_id")]
public ComplexId? SectionId { get; internal set; }

/// <summary>Gets the parent entity identifier.</summary>
/// <value>The parent entity identifier.</value>
[JsonProperty("parent_id")]
public ComplexId? ParentId { get; internal set; }

/// <summary>
/// Creates the move to project argument.
/// </summary>
Expand Down

0 comments on commit f53a1b3

Please sign in to comment.