Skip to content

Metadata API: description sometimes are editor states #1667

@kulla

Description

@kulla

What is wrong?

Metadata API returns editor state as JSON for description in some courses.

BTW: After the fix serlo/metadata-exports#214 needs to be reverted.

Steps to reproduce

  1. Go to https://api.serlo.org/___graphql
  2. Enter the query
query {
  metadata {
    resources(first: 1, after: "MTg1NzEK") {
      nodes
    }
  }
}

You see the following in the result

"description": "{\"plugin\":\"rows\",\"state\":[{\"plugin\":\"text\",\"state\":[{\"type\":\"p\",\"children\":[{}]}],\"id\":\"dd3a8cf3-e126-40be-a026-288053190bbc\"}],\"id\":\"c872656f-8893-4967-80ec-5c3a4f83f823\"}"

How should it behave?

Description should not be parsed editor state.

Proposed Solution

I guess this is a bug after serlo/db-migrations#338 since only courses are affected when I looked into it...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions