DropCollectionOptions should skip serializing fields with a None value

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 2.0.0-beta
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Most of our options structs include the serde_with::skip_serializing_none attribute to avoid sending null values to the server for unspecified options. We don't include this attribute on DropCollectionOptions, which means that if a user specifies None for write_concern, the server will return a TypeMismatch error. It's likely that this hasn't been encountered since write_concern is the only field in DropCollectionOptions, so users would likely just omit the options completely rather than specifying None; however, we should still fix this to avoid unnecessary errors.

            Assignee:
            Isabel Atkinson
            Reporter:
            Isabel Atkinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: