Skip to content

[ENHANCEMENT] Fixed crossferences on nested serializers#959

Open
calumbell wants to merge 7 commits into
open5e:stagingfrom
calumbell:crossreference-snagging
Open

[ENHANCEMENT] Fixed crossferences on nested serializers#959
calumbell wants to merge 7 commits into
open5e:stagingfrom
calumbell:crossreference-snagging

Conversation

@calumbell

Copy link
Copy Markdown
Contributor

Description

This PR updates the following nested serializers so that they now correctly return crossreferences:

  • BackgroundBenefitSerializer
  • ClassFeatureSerializer
  • CreatureActionSerializer

These are all fields where it is quite normal to want to insert crosslinks, the CreatureActionSerializer especially for linking to spell mentioned in statblocks.

Additional work was carried out to support implementing crosslinking on the frontend:

  • Crossreference data was adding for several pages for the purposes of testing the front-end.
  • Fixed sundry N+1 bugs on the crossreferences field.
  • Updated expected pytest responses to account for new shape of API response

Related Issue

Closes #953

How was this tested?

  • Spot checked on local Django development server
  • CI tests passing

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.

[BUG] Nested serializers don't return crossreferences field

1 participant