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

Add metadata labels support to the backend #3328

Merged
merged 4 commits into from
Mar 2, 2022

Conversation

rtibbles
Copy link
Member

Summary

Description of the change(s) you made

  • Adds metadata labels fields to content node
  • Adds metadata labels fields to content node exports
  • Adds metadata labels export to publish utility
  • Adds metadata labels to REST API for reading and writing
  • Allows fields to be null to prevent default setting in migration
  • Makes API always return an empty dict even when null for ease of handling on the frontend

Manual verification steps performed

  1. Go to /api/contentnode
  2. Fill out fields for content node including new metadata for labels (using checkboxes)
  3. Post data and observe the return

Screenshots (if applicable)

Screenshot from 2022-02-24 16-44-34

References

Fixes #3263
Fixes #3324

Copy link
Member

@bjester bjester left a comment

Choose a reason for hiding this comment

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

Looks pretty straightforward! Just a comment that I think the MetadataLabelsField serializer could be simplified

contentcuration/contentcuration/viewsets/contentnode.py Outdated Show resolved Hide resolved
Copy link
Member

@bjester bjester left a comment

Choose a reason for hiding this comment

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

LGTM 💯

@rtibbles rtibbles merged commit b0c97d6 into learningequality:unstable Mar 2, 2022
@rtibbles rtibbles deleted the metadata branch March 2, 2022 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Finalize labels metadata integration Categorical Metadata: Model fields
2 participants