Skip to content

Findlinks for specific subset of linklists deletes all objects stemming from other linklists #210

@PeterNerlich

Description

@PeterNerlich

I don't know if there even is a way to know which object "belongs" to which linklist, but such a check would be very helpful for find_all_links() in utils.py. I discovered that just calling it with a subset of linklists did not produce the expected result.

Steps to reproduce

  1. Ensure two linklists A and B exist drawing from distinct objects/fields
  2. Ensure content exists for each of them containing links
  3. Ensure populated db tables for linkcheck_link and linkcheck_url for objects of both linklists
  4. Run find_all_links({"A": A})

Expected result

The function goes through each object covered by linklist A and creates new Url and Link objects where needed, and deletes old ones from linklist A that do not exist in content anymore. Objects involved with content from linklist B remain unchanged.

Actual result

The function goes through each object covered by linklist A and creates new Url and Link objects where needed, and deletes all objects not created or found, even if they belong to content for linklist B which is not being indexed. This leads to all objects from B being deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions