hydroshare / hsclient

A python client for interacting with HydroShare in an object oriented way.
https://hydroshare.github.io/hsclient/
BSD 3-Clause "New" or "Revised" License
1 stars 4 forks source link

Handle a wider range of None authors in ResourcePreview model #36

Closed aaraney closed 2 years ago

aaraney commented 2 years ago

Fixes #35

This PR covers the case when an author is None in a list of authors. This is possible if a resource's author deletes their account, but others that have active accounts are still authors of the resource. This patch removes all None authors from a list of Authors. This PR covers and handles the following cases:

authors=None # -> []
authors=[] # -> []
authors=[None] # -> []
authors=["some author", None] # -> ["some author"]
aaraney commented 2 years ago

This is good to review now, I found an issue with my previous coercion approach that did not cover the case when a string was passed to the authors field. That has been resolved now.

aaraney commented 2 years ago

@sblack-usu, when are you planning on making a new release of hsclient? I have found a few resources that have an authors field of [None] that this PR resolves, but is fails in 0.2.1.

sblack-usu commented 2 years ago

I'll get a release prioritized soon. A new release is long past due. I'll check on a couple of issues in hsmodels before creating a new release of hsclient.