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

Data model for explicit storage of restricted runs and their courses #963

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

pwnage101
Copy link
Contributor

ENT-9569

@pwnage101 pwnage101 force-pushed the pwnage101/ENT-9569 branch 3 times, most recently from 63f996d to d7a8efa Compare October 9, 2024 04:33
Comment on lines 59 to 63
migrations.AlterField(
model_name='catalogquery',
name='content_filter',
field=jsonfield.fields.JSONField(default=dict, dump_kwargs={'cls': jsonfield.encoder.JSONEncoder, 'ensure_ascii': False, 'indent': 4, 'separators': (',', ':')}, help_text="Query parameters which will be used to filter the discovery service's search/all endpoint results, specified as a JSON object.", load_kwargs={'object_pairs_hook': collections.OrderedDict}),
),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why on earth is this being altered?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll rebase on alex's PR to fix this. #967

@pwnage101 pwnage101 force-pushed the pwnage101/ENT-9569 branch 2 times, most recently from 46d70a8 to c68ee7c Compare October 9, 2024 04:58
@pwnage101 pwnage101 marked this pull request as ready for review October 9, 2024 04:59
@pwnage101 pwnage101 force-pushed the pwnage101/ENT-9569 branch 5 times, most recently from 3d0d816 to 045086f Compare October 9, 2024 20:47
Copy link
Contributor

@iloveagent57 iloveagent57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good! It's reassuring that the changes in test files are all either net-new tests, or swapping json_metadata for _json_metadata. I'll try to run through your spike test on my machine today.

enterprise_catalog/apps/catalog/models.py Outdated Show resolved Hide resolved
@pwnage101 pwnage101 force-pushed the pwnage101/ENT-9569 branch 2 times, most recently from e0ff291 to a95d658 Compare October 10, 2024 20:09
Comment on lines +73 to +77
migrations.AddField(
model_name='restrictedcoursemetadata',
name='unrestricted_parent',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='restricted_courses', to='catalog.contentmetadata'),
),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would django decide to introduce AddField to the exact same migration where the model is being introduced via CreateModel?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think because it's a FK?

@pwnage101 pwnage101 merged commit 93642d4 into master Oct 10, 2024
4 checks passed
@pwnage101 pwnage101 deleted the pwnage101/ENT-9569 branch October 10, 2024 20:29
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.

3 participants