From efe784fe8a6c23248c6698aefab8bf54c5c85900 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Tue, 23 Aug 2022 12:54:16 +0400 Subject: Support Hyperlinked Tag Group Replacement Signed-off-by: Hassan Abouelela --- pydis_site/apps/content/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 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 63f1c41c..32d3d638 100644 --- a/pydis_site/apps/content/utils.py +++ b/pydis_site/apps/content/utils.py @@ -221,7 +221,7 @@ def get_tags() -> list[Tag]: return Tag.objects.all() -def get_tag(path: str) -> typing.Union[Tag, list[Tag]]: +def get_tag(path: str, *, skip_sync: bool = False) -> typing.Union[Tag, list[Tag]]: """ Return a tag based on the search location. @@ -243,7 +243,7 @@ def get_tag(path: str) -> typing.Union[Tag, list[Tag]]: matches = [] for tag in get_tags(): if tag.name == name and tag.group == group: - if tag.last_commit is None: + if tag.last_commit is None and not skip_sync: set_tag_commit(tag) return tag elif tag.group == name and group is None: -- cgit v1.2.3