diff options
author | 2022-08-23 13:11:35 +0400 | |
---|---|---|
committer | 2022-08-23 13:11:35 +0400 | |
commit | 2343f7ab5c738b5b28554c766e78eb6a663bd064 (patch) | |
tree | 924264f61a5fa7a8b569eef69e398e91de958b18 /pydis_site/apps/content/utils.py | |
parent | Support Hyperlinked Tag Group Replacement (diff) |
Rename Tag Model Author Field
Renames the tag model `author` field to `authors` to better indicate
what's contained in the field, and updates the documentation.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'pydis_site/apps/content/utils.py')
-rw-r--r-- | pydis_site/apps/content/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pydis_site/apps/content/utils.py b/pydis_site/apps/content/utils.py index 32d3d638..a1171a45 100644 --- a/pydis_site/apps/content/utils.py +++ b/pydis_site/apps/content/utils.py @@ -137,7 +137,7 @@ def set_tag_commit(tag: Tag) -> None: sha="68da80efc00d9932a209d5cccd8d344cec0f09ea", message="Initial Commit\n\nTHIS IS FAKE DEMO DATA", date=datetime.datetime(2018, 2, 3, 12, 20, 26, tzinfo=datetime.timezone.utc), - author=json.dumps([{"name": "Joseph", "email": "[email protected]"}]), + authors=json.dumps([{"name": "Joseph", "email": "[email protected]"}]), ) return @@ -159,15 +159,15 @@ def set_tag_commit(tag: Tag) -> None: date = date.replace(tzinfo=datetime.timezone.utc) if author["email"] == committer["email"]: - commit_author = [author] + authors = [author] else: - commit_author = [author, committer] + authors = [author, committer] commit_obj, _ = Commit.objects.get_or_create( sha=data["sha"], message=commit["message"], date=date, - author=json.dumps(commit_author), + authors=json.dumps(authors), ) tag.last_commit = commit_obj tag.save() |