Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update static_replace import to work with lilac. #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johanseto
Copy link

Description

This PR makes a little fix to the xblock in order to be used in lilac versions.

Change the static_replace import for lilac in image_explorer.py in order to be updated with lilac version imports
and avoid DeprecatedEdxPlatformImportError.

error:

cms_1            |   File "/openedx/venv/lib/python3.8/site-packages/image_explorer/image_explorer.py", line 215, in student_view_data
cms_1            |     background['src'] = self._replace_static_from_url(background['src'])
cms_1            |   File "/openedx/venv/lib/python3.8/site-packages/image_explorer/image_explorer.py", line 336, in _replace_static_from_url
cms_1            |     from static_replace import replace_static_urls
cms_1            |   File "/openedx/edx-platform/import_shims/lms/static_replace/__init__.py", line 6, in <module>
cms_1            |     warn_deprecated_import('static_replace', 'common.djangoapps.static_replace')
cms_1            |   File "/openedx/edx-platform/import_shims/warn.py", line 37, in warn_deprecated_import
cms_1            |     raise DeprecatedEdxPlatformImportError(old_import, new_import)
cms_1            | import_shims.warn.DeprecatedEdxPlatformImportError

Update static_replace import for lilac.
@johanseto
Copy link
Author

Hi actually this PR is failing one test, but if you see the error it is not a thing I can control: https://app.circleci.com/pipelines/github/edx-solutions/xblock-image-explorer/155/workflows/cc54e07d-3ea9-4322-ad01-030b81a8744a/jobs/315?invite=true#step-103-133.

Besides this PR make a very small change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant