Skip to content

ClausePresenter throws a NoMethodError when user tries to search a non-existant field #3441

Open
@sandbergja

Description

@sandbergja

Steps to recreate

  1. Start blacklight locally
  2. Go to http://localhost:3000/?clause[0][field]=not_a_real_field&clause[0][query]=cats
  3. Note that you get NoMethodError (undefined method 'display_label' for nil:NilClass)

Every other part of the stack is able to handle cases in which the field does not exist, I think that this class should match.

Alternatively, if we do want to throw an error in cases that the user tries to search a non-existant field, I think it should be a more intuitive error in a different part of the stack.

Metadata

Metadata

Assignees

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