这是indexloc提供的服务,不要输入任何密码
Skip to content

Update doesn’t allow resetting field to null #284

@limoniapps

Description

@limoniapps

Been using ShopifySharp for a while now and suite happy with it!

Today I ran into unexpected behavior when attempting to update a PriceRule (but the behavior is true for all entities). I want to reset the EndsAt date from a value to null (no end date applies). The update doesn’t actually tale effect because EndsAt is never sent to Shopify. This is because the Json serializer is instructed to ignore nulls.

How would one go about updating a value to null with ShopifySharp?

Perhaps it would be useful to add a parameter to Update to ignore nulls or not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    missing or invalid propertiesobject updatingBugs and strange behavior around updating objects, primarly related to #284questionstaleIssues that have become inactive and need attention/review from @nozzlegear

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions