From 2343f7ab5c738b5b28554c766e78eb6a663bd064 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Tue, 23 Aug 2022 13:11:35 +0400 Subject: 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 --- pydis_site/apps/content/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pydis_site/apps/content/utils.py') 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": "joseph@josephbanks.me"}]), + authors=json.dumps([{"name": "Joseph", "email": "joseph@josephbanks.me"}]), ) 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() -- cgit v1.2.3