public-law / open-gov-crawlers

Parse government documents into well formed JSON
65 stars 5 forks source link

Fix: Colorado "duplicate" Divisions #177

Open dogweather opened 1 year ago

dogweather commented 1 year ago

E.g.:

Error importing Division(Nonprofit Corporations) in Title 7: PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "index_statutes_on_citation_and_year_and_publication_id"
   3   │ DETAIL:  Key (citation, year, publication_id)=(C.R.S. Title 7. Division “Nonprofit Corporations”, 2022, 10) already exists.
dogweather commented 1 year ago

Wait a minute ... I don't see how Part could play a role.

dogweather commented 1 year ago

So, Nonprofit Corporations appears twice) as a Division. The first time it's at the location of previously existing statutes. The second time, it's at the new location.

dogweather commented 1 year ago

Options:

dogweather commented 1 year ago

Ah hah — I'm seeing Divisions and Subdivisions. And uniqueness is preserved.

Screenshot 2023-07-21 at 12 48 47 PM
dogweather commented 1 year ago

I seem to be parsing Divisions and Subdivisions all as Divisions.

dogweather commented 1 year ago

Possible attributes of each

dogweather commented 1 year ago

Maybe just create something called "Heading"?