Skip to content

Commit

Permalink
fix: Allow empty icon (None) in icon tags (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun authored Oct 23, 2023
1 parent 3df8823 commit 5f82c14
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.11'
cache: 'pip'
- name: Cache dependencies
uses: actions/[email protected]
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.11'
cache: 'pip'
- name: Cache dependencies
uses: actions/[email protected]
Expand Down
11 changes: 8 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

sphinx:
configuration: docs/source/conf.py
fail_on_warning: false
Expand All @@ -9,7 +16,5 @@ formats:
- pdf

python:
version: 3.8

install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion djangocms_frontend/contrib/icon/templatetags/icon_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@register.inclusion_tag("djangocms_frontend/icon/add_css.html", takes_context=True)
def add_css_for_icon(context, icon):
if icon.get("library", "") in ICON_LIBRARIES:
if icon and icon.get("library", "") in ICON_LIBRARIES:
css_link = ICON_LIBRARIES[icon.get("library")][1]
if css_link:
if "/" not in css_link: # static link?
Expand Down

0 comments on commit 5f82c14

Please sign in to comment.