Fix deprecation warning on serialized_attributes method