learningequality / learningequality/studio

Update the Change model to enforce created_by_id null=False

Open
#3,490 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2 - normal TAG: tech update / debt
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:

  1. Enforce null=False for created_by_id field of Change object.
  2. Revert logging mechanism implemented in NoneCreatedByIdError

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.