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

Error when trying to create a list with name #7

Open
Emmaos505 opened this issue May 21, 2024 · 0 comments
Open

Error when trying to create a list with name #7

Emmaos505 opened this issue May 21, 2024 · 0 comments

Comments

@Emmaos505
Copy link

Bug
If I want to create a list with a name consisting of more than one word, an error occurs.
How to replicate the error ?
Create a list with name LISTA UNO
Solution
Modify the searchWistlist method located inside node/clients/masterdata.ts for the following

  public async searchWistlist(
    field: string,
    value: string,
    pagination?: { page: number; pageSize: number }
  ): Promise<Wishlist[]> {
    const { page, pageSize } = pagination ?? {}

    return this.http.get(
      `/api/dataentities/${DATA_ENTITY_NAME}/search?_where=${field}='${value}'&_fields=${FIELDS}&_sort=createdIn&_schema=${SCHEMA_NAME}`,
      {
        headers: {
          'REST-Range': `resources=${page ?? 0}-${pageSize ?? 100}`,
        },
      }
    )
  }

Change introduced: wrap the value that arrives as argument in single quotes.

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

No branches or pull requests

1 participant