You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above class does not have the attachment_type and payload attributes, I guess you have kept this to be used by child classes, which make sense.
Although creating the instance of Attachment is not the idea, But instance can be created. And in that case to_dict() will break, since the attachment_type and payload attributes are not there.
There are two solution of the problem:
Solution 1: allows instantiation of Attachment and add attributes to the class. Will not recommend it since the idea is not to allow the instantiation of this class.
Solution 2: Does not allow instance of class while maintaining the inheritance of the attributes.
The text was updated successfully, but these errors were encountered:
The above class does not have the
attachment_type
andpayload
attributes, I guess you have kept this to be used by child classes, which make sense.Although creating the instance of Attachment is not the idea, But instance can be created. And in that case
to_dict()
will break, since theattachment_type
andpayload
attributes are not there.There are two solution of the problem:
Solution 1: allows instantiation of Attachment and add attributes to the class. Will not recommend it since the idea is not to allow the instantiation of this class.
Solution 2: Does not allow instance of class while maintaining the inheritance of the attributes.
The text was updated successfully, but these errors were encountered: