Skip to content

Create KER Object when a Wiki is made#1069

Merged
tarrow merged 1 commit intomainfrom
T419208
Mar 19, 2026
Merged

Create KER Object when a Wiki is made#1069
tarrow merged 1 commit intomainfrom
T419208

Conversation

@tarrow
Copy link
Contributor

@tarrow tarrow commented Mar 19, 2026

This creates a KnowledgeEquityResponse Object if one is provided at wiki creation time.

It adds some validation for the content revieved over the network.

No sanitisation has been applied to the freeTextResponse. This needs to be taken into account if we reuse this somewhere

Bug: T419208

@tarrow tarrow marked this pull request as ready for review March 19, 2026 10:10
@tarrow
Copy link
Contributor Author

tarrow commented Mar 19, 2026

@outdooracorn @rosalieper : in the effort of this moving fast I've just opened this for review immediately. Let me know what you think. I'd particularly like input on the test case.

Should I add additional ones? If so which cases should I test?

@outdooracorn
Copy link
Member

Should I add additional ones? If so which cases should I test?

Yeah, I think I would like to see:

  • a knowledgeEquityResponse.selectedOption that isn't one of the allowed options is rejected
  • a knowledgeEquityResponse.freeTextResponse that is exactly 3,000 characters is successful
  • a knowledgeEquityResponse.freeTextResponse that is more than 3,000 characters is rejected

I also wonder about making the testCreateWithKERCreatesProfiles test case not provide a knowledgeEquityResponse.freeTextResponse so that we validate that is optional.

Probably not much point in adding a test for knowledgeEquityResponse.selectedOption being optional as that will be required in a later step.

Copy link
Contributor

@rosalieper rosalieper left a comment

Choose a reason for hiding this comment

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

I am happy with this as it is. this adds the KER to the database during wiki creation and the test tests that the KER has been added to the DB during wiki creation.

This creates a KnowledgeEquityResponse Object if one
is provided at wiki creation time.

It adds some validation for the content revieved over the network.

No sanitisation has been applied to the freeTextResponse. This needs to
be taken into account if we reuse this somewhere

Bug: T419208
Copy link
Member

@outdooracorn outdooracorn left a comment

Choose a reason for hiding this comment

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

🚀

@tarrow tarrow merged commit 34f63a4 into main Mar 19, 2026
5 checks passed
@tarrow tarrow deleted the T419208 branch March 19, 2026 14:39
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