diff options
author | 2022-08-23 12:54:16 +0400 | |
---|---|---|
committer | 2022-08-23 12:57:06 +0400 | |
commit | efe784fe8a6c23248c6698aefab8bf54c5c85900 (patch) | |
tree | aeb4f58c274b1938182862eafc1275be5fadbbc3 /pydis_site/apps/content/utils.py | |
parent | Merge 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.py | 4 |
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: |