Skip to content

Commit

Permalink
add doc improvement to update_metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollman committed Dec 5, 2024
1 parent 7150f38 commit 7f19f39
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion caveclient/annotationengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ def update_metadata(
notice_text: str, optional
Text the user will see when querying this table. Can be used to warn users of flaws,
and uncertainty in the data, or to advertise citations that should be used with this table.
If you wish to remove the notice_text pass an empty string.
Defaults to None. (will not update)
aligned_volume_name : str or None, optional
Name of the aligned_volume. If None, uses the one specified in the client.
Expand Down Expand Up @@ -405,7 +406,10 @@ def update_metadata(
if user_id is not None:
metadata["user_id"] = user_id
if notice_text is not None:
metadata["notice_text"] = notice_text
if notice_text == "None":
metadata["notice_text"] = ''
else:
metadata["notice_text"] = notice_text

data = {"table_name": table_name, "metadata": metadata}
response = self.session.put(url, json=data)
Expand Down

0 comments on commit 7f19f39

Please sign in to comment.