Skip to content

Commit

Permalink
refactor: Record.vault_url always a string
Browse files Browse the repository at this point in the history
also rewrite to save one line of code
  • Loading branch information
phette23 committed Aug 1, 2024
1 parent 635afab commit 44fa851
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions migrate/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,11 @@ def __init__(self, item):
self.title: str = item.get("name", "Untitled")
# default to current date in ISO 8601 format
self.createdDate: str = item.get("createdDate", date.today().isoformat())
self.vault_url: str = ""
if item.get("uuid") and item.get("version"):
self.vault_url = (
f"https://vault.cca.edu/items/{item['uuid']}/{item['version']}/"
)
else:
self.vault_url = None

@property
def abstracts(self) -> list:
Expand Down

0 comments on commit 44fa851

Please sign in to comment.