Issue 9848

Title
Can not delete products on web_shop_vue_storefront
Priority
bug
Status
resolved
Nosy list
ced, iehoshia, reviewbot, roundup-bot
Assigned to
ced
Keywords
review

Created on 2020-11-18.17:42:25 by iehoshia, last changed 1 month ago by roundup-bot.

Messages

New changeset 06bb39cd02be by Cédric Krier in branch '5.8':
Prevent NotFoundError when deleting entry
https://hg.tryton.org/modules/web_shop_vue_storefront/rev/06bb39cd02be
New changeset 19f8d26dab7f by Cédric Krier in branch 'default':
Prevent NotFoundError when deleting entry
https://hg.tryton.org/tryton-env/rev/19f8d26dab7f
New changeset 6265d3cbb702 by Cédric Krier in branch 'default':
Prevent NotFoundError when deleting entry
https://hg.tryton.org/modules/web_shop_vue_storefront/rev/6265d3cbb702
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-11-27.00:33:32

I guess it happens because the product was removed before even being pushed to elasticsearch.
I think we can just catch the NotFoundError on each delete call.

Author: [hidden] (iehoshia)
Date: 2020-11-18.17:42:25

Hi,

I'm trying the new modules web_shop and web_shop_vue_storefront

I found these issue when I do the follows steps:

  1. Create a Shop of type "Vue Storefront".
  2. Add warehouses, products, categories and attributes.
  3. Execute Scheduled Action, Update Vue Storefront. At these point all works fine.
  4. Delete products.
  5. Execute Scheduled Action, Update Vue Storefront.

I use elasticsearch 7.10.0

Traceback (most recent call last):
  File "/opt/vita/lib/python37/site-packages/trytond/wsgipy", line 111, in dispatch_request
    return endpoint(request, **requestview_args)
  File "/opt/vita/lib/python37/site-packages/trytond/protocols/dispatcherpy", line 48, in rpc
    request, database_name, *requestrpc_params)
  File "/opt/vita/lib/python37/site-packages/trytond/wsgipy", line 78, in auth_required
    return wrapped(*args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/protocols/wrapperspy", line 131, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/protocols/dispatcherpy", line 181, in _dispatch
    result = rpcresult(meth(*c_args, **c_kwargs))
  File "/opt/vita/lib/python37/site-packages/trytond/model/descriptorspy", line 33, in newfunc
    return selffunc(owner, *args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/model/modelviewpy", line 736, in wrapper
    return func(cls, records, *args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/modules/company/irpy", line 95, in run_once
    super(Cron, cls)run_once([cron])
  File "/opt/vita/lib/python37/site-packages/trytond/model/descriptorspy", line 33, in newfunc
    return selffunc(owner, *args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/model/modelviewpy", line 736, in wrapper
    return func(cls, records, *args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/ir/cronpy", line 114, in run_once
    getattr(Model, method)()
  File "/opt/vita/lib/python37/site-packages/trytond/modules/web_shop_vue_storefront/webpy", line 210, in vsf_update
    id=productvsf_identifierid)
  File "/opt/vita/lib/python37/site-packages/trytond/modules/web_shop_vue_storefront/webpy", line 24, in wrapper
    return func(*args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/modules/web_shop_vue_storefront/webpy", line 37, in delete
    return super()delete(**kwargs)
  File "/opt/vita/lib/python37/site-packages/elasticsearch/client/utilspy", line 152, in _wrapped
    return func(*args, params=params, headers=headers, **kwargs)
  File "/opt/vita/lib/python37/site-packages/elasticsearch/client/__init__py", line 597, in delete
    "DELETE", _make_path(index, doc_type, id), params=params, headers=headers
  File "/opt/vita/lib/python37/site-packages/elasticsearch/transportpy", line 392, in perform_request
    raise e
  File "/opt/vita/lib/python37/site-packages/elasticsearch/transportpy", line 365, in perform_request
    timeout=timeout,
  File "/opt/vita/lib/python37/site-packages/elasticsearch/connection/http_urllib3py", line 269, in perform_request
    self_raise_error(responsestatus, raw_data)
  File "/opt/vita/lib/python37/site-packages/elasticsearch/connection/basepy", line 313, in _raise_error
    status_code, error_message, additional_info
elasticsearchexceptionsNotFoundError: NotFoundError(404, '{"_index":"vue_storefront_catalog_product","_type":"_doc","_id":"6","_version":3,"result":"not_found","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":26,"_primary_term":1}')
History
Date User Action Args
2021-01-24 19:47:32roundup-botsetkeyword: - backport
messages: + msg64067
2021-01-18 23:28:12roundup-botsetmessages: + msg63968
2021-01-18 23:28:08roundup-botsetmessages: + msg63967
nosy: + roundup-bot
status: testing -> resolved
2021-01-06 00:08:47cedsetkeyword: + backport
2021-01-05 23:47:24reviewbotsetmessages: + msg63779
nosy: + reviewbot
2021-01-05 23:37:12cedsetassignedto: ced
component: + web_shop_vue_storefront, - web_shop
keyword: + review
reviews: 349231002
status: chatting -> testing
2020-11-27 00:33:32cedsetmessages: + msg62230
nosy: + ced
status: unread -> chatting
2020-11-18 17:42:25iehoshiacreate

Showing 10 items. Show all history (warning: this could be VERY long)