We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a35da3 commit 9824e4fCopy full SHA for 9824e4f
addon/serializers/waypoint.js
@@ -72,6 +72,16 @@ export default class WaypointSerializer extends ApplicationSerializer.extend(Emb
72
type = belongsTo.attr(`${key}_type`);
73
}
74
75
+ // hotfix polymprohpic model types that do not exists as models like `customer-contact` `customer-vendor` should be `contact` or `vendor`
76
+ if (typeof type === 'string') {
77
+ if (type.startsWith('customer-')) {
78
+ type = type.replace('customer-', '');
79
+ }
80
+ if (type.startsWith('facilitator-')) {
81
+ type = type.replace('facilitator-', '');
82
83
84
+
85
if (!belongsTo) {
86
json[key + '_type'] = null;
87
} else {
0 commit comments