Skip to content

Add metadata labels support to the backend#3328

Merged
rtibbles merged 4 commits intolearningequality:unstablefrom
rtibbles:metadata
Mar 2, 2022
Merged

Add metadata labels support to the backend#3328
rtibbles merged 4 commits intolearningequality:unstablefrom
rtibbles:metadata

Conversation

@rtibbles
Copy link
Copy Markdown
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
Copy Markdown
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

Copy link
Copy Markdown
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