Fix: Editable attrs presence check for the channel class (#3630)

This commit is contained in:
Tejaswini Chile 2021-12-20 19:38:38 +05:30 committed by GitHub
parent ad09c5dc5f
commit 76e8acd3c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,6 +124,10 @@ class Api::V1::Accounts::InboxesController < Api::V1::Accounts::BaseController
end end
def get_channel_attributes(channel_type) 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
end end