Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Event Streaming: Error while Trying to Remove Child on the Consumer Site #11

@landersaga

Description

@landersaga

Description of the issue

We have a document that exists on both producer and consumer site. The document consist 1 or more row of child table, the name of a row in a producer site is different with the one on the consumer site. When user deleted a row on the producer site, it caused error on the consumer site because the stream will search the child table document/row with the name from the producer site. This cause deleting of a child table row has to be done manuallly on the consumer site.

Output of bench version

5.20.0

Steps to reproduce the issue

  1. Prepare same document name (with child table) on the producer and consumer site (the creation must be done manually)
  2. Delete child table on the producer site

Observed result

  • Caught ValueError: list.remove(x): x not in list
    image

Expected result

Child table removed from the document on the consumer site

Stacktrace / full error message

Traceback (most recent call last):
  File "apps/frappe/frappe/event_streaming/doctype/event_producer/event_producer.py", line 279, in sync
    set_update(update, producer_site)
  File "apps/frappe/frappe/event_streaming/doctype/event_producer/event_producer.py", line 331, in set_update
    local_doc = update_row_removed(local_doc, data.removed)
  File "apps/frappe/frappe/event_streaming/doctype/event_producer/event_producer.py", line 356, in update_row_removed
    table_rows.remove(child_table_row)
ValueError: list.remove(x): x not in list

Additional information

Frappe version: v14.62.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions