agrs-sequelize-sdk 1.1.69 → 1.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/models/Ad.js +4 -6
- package/package.json +1 -1
package/models/Ad.js
CHANGED
|
@@ -155,7 +155,7 @@ module.exports = (sequelize, DataTypes) => {
|
|
|
155
155
|
constraints: false, // Disable FK constraint
|
|
156
156
|
});
|
|
157
157
|
|
|
158
|
-
Ad.belongsTo(models.
|
|
158
|
+
Ad.belongsTo(models.RSOCFeedCampaign, {
|
|
159
159
|
foreignKey: "AGRS_CID",
|
|
160
160
|
targetKey: "AGRS_CID",
|
|
161
161
|
as: "RSOCFeedCampaign",
|
|
@@ -223,11 +223,9 @@ module.exports = (sequelize, DataTypes) => {
|
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
// Try fetching related RSOCFeedCampaign
|
|
226
|
-
const rsocFeedCampaign = await sequelize.models.
|
|
227
|
-
{
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
);
|
|
226
|
+
const rsocFeedCampaign = await sequelize.models.RSOCFeedCampaign.findOne({
|
|
227
|
+
where: { AGRS_CID: this.AGRS_CID },
|
|
228
|
+
});
|
|
231
229
|
|
|
232
230
|
if (rsocFeedCampaign) {
|
|
233
231
|
return {
|