aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/utils.py
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-08-23 12:54:16 +0400
committerGravatar Hassan Abouelela <[email protected]>2022-08-23 12:57:06 +0400
commitefe784fe8a6c23248c6698aefab8bf54c5c85900 (patch)
treeaeb4f58c274b1938182862eafc1275be5fadbbc3 /pydis_site/apps/content/utils.py
parentMerge branch 'main' into bot-tags (diff)
Support Hyperlinked Tag Group Replacement
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'pydis_site/apps/content/utils.py')
-rw-r--r--pydis_site/apps/content/utils.py4
1 files changed, 2 insertions, 2 deletions
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: