learningequality / learningequality/studio
Make publishable state clearer to the user
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 191
- Forks
- 307
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
User attempted to publish a channel which had no resources, only 2 folders. This is not a valid, publishable channel. How can we make this more clear?
Sentry Issue: STUDIO-HJC
ChannelIncompleteError: Attempted to publish a channel with an incomplete root node or no resources
File "contentcuration/viewsets/channel.py", line 533, in publish
channel = publish_channel(
File "contentcuration/utils/publish.py", line 936, in publish_channel
kolibri_temp_db = create_content_database(channel, force, user_id, force_exercises, progress_tracker=progress_tracker)
File "contentcuration/utils/publish.py", line 138, in create_content_database
tree_mapper = TreeMapper(
File "contentcuration/utils/publish.py", line 206, in __init__
raise ChannelIncompleteError("Attempted to publish a channel with an incomplete root node or no resources")
ValidationError: ["Channel is not ready to be published"]
File "contentcuration/viewsets/channel.py", line 508, in publish_from_changes
self.publish(
File "contentcuration/viewsets/channel.py", line 558, in publish
raise ValidationError("Channel is not ready to be published")
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with contentcuration/viewsets/channel.py around publish_from_changes and publish, then inspect contentcuration/utils/publish.py around create_content_database and TreeMapper. Reproduce the case of a channel with folders but no resources and trace the existing validation and error handling. Done means the publishability problem is communicated more clearly to the user.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100