Skip to content

Commit

Permalink
better locality admin; indigo ingestor ignores playgrounds
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Aug 12, 2023
1 parent 0b7635b commit f3cd0b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion peachjam/adapters/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ def place_codes(self):
codes.append(place)
# get all localities for this place
for loc in self.places[place]["localities"]:
codes.append(loc["frbr_uri_code"])
# ignore playgrounds when expanding wildcards
if loc["code"] != "playground":
codes.append(loc["frbr_uri_code"])
continue
else:
codes.append(code)
Expand Down
7 changes: 6 additions & 1 deletion peachjam/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,9 +909,14 @@ class LabelAdmin(admin.ModelAdmin):
prepopulated_fields = {"code": ("name",)}


@admin.register(Locality)
class LocalityAdmin(admin.ModelAdmin):
list_display = ("name", "jurisdiction", "code")
prepopulated_fields = {"code": ("name",)}


admin.site.register(
[
Locality,
CitationLink,
Attorney,
Judge,
Expand Down

0 comments on commit f3cd0b8

Please sign in to comment.