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

Api returns old values for collectionlink fileds value #1469

Open
drascom opened this issue Sep 11, 2021 · 1 comment
Open

Api returns old values for collectionlink fileds value #1469

drascom opened this issue Sep 11, 2021 · 1 comment

Comments

@drascom
Copy link

drascom commented Sep 11, 2021

hi everyone;
i’m not native english speaker sorry for mistakes :),
the problem is when i update a field via api which is added as a collection link to another collection,
i can see this update at admin panel (backend) but api request gives me ald value of that field.
also same issue mentioned here too
https://discourse.getcockpit.com/t/bug-updates-to-linkcollection-such-as-name-show-in-the-ui-but-do-not-show-in-the-api-json/1454?u=drascom
Api response is

    {
      "name": "ADANA",
      "_by": "e5089a44633938387e00010a",
      "_mby": "e5089a44633938387e00010a",
      "_modified": 1631363616,
      "teams": [
        {
          "_id": "507d226063326474930002ee",
          "link": "teams",
          "display": "DENEME" <----------  old value
        }
      ],

json from admin panel is

  "name": "ADANA",
  "_by": "e5089a44633938387e00010a",
  "_mby": "e5089a44633938387e00010a",
  "_modified": 1631363616,
  "teams": [
    {
      "_id": "507d226063326474930002ee",
      "link": "teams",
      "display": "DENEME2" <--------------   new value
    }
  ],

i noticed collection link field is not really updating when i'm updating the source table fields. when i open the admin panel it is requesting related fields data from it’s own collection each time .
i’m seeing old value because i’m only requesting main collection and not fetching collectionlinks fileds values from related table.

it is a bug isnt it ?

@ealbinu
Copy link

ealbinu commented Oct 18, 2021

I'm getting exactly the same thing

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

2 participants