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

PATCH doesn't reindex content #531

Closed
dest81 opened this issue Jun 5, 2018 · 2 comments
Closed

PATCH doesn't reindex content #531

dest81 opened this issue Jun 5, 2018 · 2 comments

Comments

@dest81
Copy link

dest81 commented Jun 5, 2018

I tried to update object and it have changed but catalog record not.

I use:

  • Plone 5.0.6
  • plone.restapi 2.0
  • Archetypes 1.11.2
@tisto
Copy link
Sponsor Member

tisto commented Jun 19, 2018

@dest81 please provide more information about what kind of request you sent, what response you got, the expected outcome and the actual outcome.

@dest81
Copy link
Author

dest81 commented Jun 21, 2018

Here is code I used to send request:

# =================   CREATE PAGE  ============================
folder_url = 'test_folder'
data = {
    '@type': 'Document',
    'title': 'Test Page',
    'text': 'Test PAGE'
}
response = requests.post(folder_url, json=data, **kwargs)
result = response.json()
page_url = result['@id']

# =================   CHECK IF PAGE EXISTS THAN UPDATE IT ====================
response = requests.get(page_url, **kwargs)
if response.status_code == 200:
    print "Page exists, let's update it"
    data = {'title': 'Test Page Updated', 'text': 'Test PAGE UPDATED'}

    response = requests.patch(page_url, json=data, **kwargs)
    if response.status_code == 204:
        print "Page updated"`

After I see page with Title 'Test Page Updated', but if I look in catalog I see 'Test Page'.
screen shot 2018-06-21 at 13 25 34

Notes:

  • Reindex helps
  • With Dexterity works fine

@buchi buchi self-assigned this Jun 22, 2018
buchi added a commit that referenced this issue Jun 23, 2018
buchi added a commit that referenced this issue Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants