Skip to content

Commit

Permalink
Reverted back to invalid None assignment
Browse files Browse the repository at this point in the history
Update methods should really take partial models with all-optional
contents (SciCatProject#58). Rather than fixing that issue, let's just ignore
the typing error for now.
  • Loading branch information
sbliven committed Nov 30, 2023
1 parent f5261c5 commit 926d3ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyscicat/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ def proposals_update(
if proposalId is None:
assert proposal.proposalId is not None, "proposalId should not be None"
proposalId = proposal.proposalId
proposal.proposalId = ""
# TODO updates should allow partial proposals, where all fields are optional. See #58
proposal.proposalId = None # type: ignore [assignment]
result = self._call_endpoint(
cmd="patch",
endpoint=f"Proposals/{quote_plus(proposalId)}",
Expand Down

0 comments on commit 926d3ed

Please sign in to comment.