fix ineffective polymorphic_type on custom model