Project

General

Profile

« Previous | Next » 

Revision 75e3743d

Added by Eric Helms almost 9 years ago

Fixes #10803: Return nil if no resource_type when creating a filter.

In some instances, such as during DB seed, when a filter is being
created for the first time the before_validation callback to
build_taxonomy_search is triggered. Since, the filter hasn't been
saved, there are no permissions connected to the filter yet when
the 'permissions.first.try(:resource_type)' call is made generating
the resource_type. This in turn leads get_resource_class to call
constantize on 'nil' and throw an exception which then appears
throughout the db:seed log.

  • added
  • modified
  • copied
  • renamed
  • deleted