public-accountability / littlesis-rails

LittleSis is a free database of who-knows-who at the heights of business and government
https://littlesis.org
GNU General Public License v3.0
100 stars 12 forks source link

Relationship can be added between an entity and itself #1727

Open betsydupuis opened 3 months ago

betsydupuis commented 3 months ago
Screenshot 2024-08-10 at 2 12 22 PM
josephlacey commented 3 months ago

Is there ever an example where this is valid? I can't think of one. This is probably an edge case data entry mistake regardless.

aepyornis commented 3 months ago

There are some. If you go down the rabbit hole of how we represent political campaign finance donations in LittleSis, you can find some valid cases. We create aggregate contribution relationships between the donor and the politician (i.e. donations than span multiple campaign entities).

So this relationship https://littlesis.org/relationships/1157009 contains Trump's FEC donations to his own campaigns and should remain.

But yes, position relationships don't make a lot of sense here and that one should probably be removed.

betsydupuis commented 3 months ago

So this relationship https://littlesis.org/relationships/1157009 contains Trump's FEC donations to his own campaigns and should remain.

These donations might actually be duplicates. They are made to "DONALD J. TRUMP FOR PRESIDENT, INC."

I normally link PACs and a person, but keep any manually entered donations on the PAC. It certainly makes the interlock detection less useful because it adds a degree of separation, but keeps the candidate tidy, especially when they've run for different offices. It gets even more confusing when the PAC converts when they don't win.

Probably at a minimum should not be allowed for:

Just an example, this is how a small campaign looks in Texas: blob:https://traviscountytx.easyvotecampaignfinance.com/3746a7e7-bc29-4153-b83d-396face6415c (copy and paste the whole link including the blob part)

Our local rules don't require a treasurer until they reach a certain amount. Although it could be argued that a campaign is always a separate entity.

As an aside on that blob syntax, is that common enough that it should be supported?

aepyornis commented 3 months ago

hmm, it was edited 7 years ago so you may be right about that one. but in general our fec matching tool does track 2 relationships and will update both the donor->candidate relationship and the donor->committee relationship

https://github.com/public-accountability/littlesis-rails/blob/main/app/models/fec_match.rb

We have automated importing tools for Federal and New York State data...every state has different rules and forms of course !

betsydupuis commented 3 months ago

@mooninmyname What are your thoughts on whether entities should be allowed to have relationships with themselves?

aepyornis commented 3 months ago

there are about 1k of them on the site

 Relationship.where("entity1_id = entity2_id").count
=> 1097