learningequality / learningequality/studio
Update the Change model to enforce created_by_id null=False
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 191
- Forks
- 307
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
Summary
PR #3471 Implements a logging mechanism when the created_by_id of the change object is set to None. This is done to ensure any undesired behavior in change_object_signals as it involves creating groups based on the user_id. This issue is a reminder to enforce the created_by_id field of the change object to strictly have a non null value once the #1990 is implemented. After the implementation of #1990 we need to do the following things:
- Enforce null=False for created_by_id field of Change object.
- Revert logging mechanism implemented in NoneCreatedByIdError
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
After issue #1990 is implemented, inspect the Change model's created_by_id field in contentcuration/contentcuration/models.py and the NoneCreatedByIdError logging mechanism from PR #3471. Enforce a non-null created_by_id value and revert that logging mechanism, then run the relevant model and migration tests to verify the constraint and cleanup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, database
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100