From 76e8acd3c681d4ea4faaf4976a5658cb47954cb3 Mon Sep 17 00:00:00 2001 From: Tejaswini Chile Date: Mon, 20 Dec 2021 19:38:38 +0530 Subject: [PATCH] Fix: Editable attrs presence check for the channel class (#3630) --- app/controllers/api/v1/accounts/inboxes_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v1/accounts/inboxes_controller.rb b/app/controllers/api/v1/accounts/inboxes_controller.rb index 463a08bfb..1720ee692 100644 --- a/app/controllers/api/v1/accounts/inboxes_controller.rb +++ b/app/controllers/api/v1/accounts/inboxes_controller.rb @@ -124,6 +124,10 @@ class Api::V1::Accounts::InboxesController < Api::V1::Accounts::BaseController end def get_channel_attributes(channel_type) - channel_type.constantize::EDITABLE_ATTRS.presence || [] + if channel_type.constantize.const_defined?('EDITABLE_ATTRS') + channel_type.constantize::EDITABLE_ATTRS.presence + else + [] + end end end