Skip to content

Commit

Permalink
fix: forgot to specify settings
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Nov 24, 2023
1 parent ac12857 commit fa5805f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/api/views/objects/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _compile_lookup_fields(self) -> Set[str]:
allowed_fields: List = getattr( # the lookup fields allowed for the provider
self.provider, "additional_lookup_fields", []
)
allowed_fields.extend(GLOBAL_LOOKUPS)
allowed_fields.extend(settings.GLOBAL_LOOKUPS)
return set(
allowed_fields
) # use a set for better memory performance & no duplicates.
Expand Down Expand Up @@ -127,7 +127,7 @@ def validate_lookup(self) -> None:
lookup = self.request.query_params.get("lookup")
if lookup is None:
return
lookup = lookup or GLOBAL_LOOKUPS[0]
lookup = lookup or settings.GLOBAL_LOOKUPS[0]
if lookup not in self.additional_lookup_fields:
raise BadRequest(
f"Invalid lookup field {lookup}. Valid fields are: {', '.join(self.additional_lookup_fields)}."
Expand Down

0 comments on commit fa5805f

Please sign in to comment.