adminizer 4.3.0-build.105 → 4.3.0-build.106

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.
@@ -112,7 +112,7 @@ export default async function edit(req, res) {
112
112
  }
113
113
  try {
114
114
  let newRecord = await entity.model.update(params, reqData, dataAccessor);
115
- await saveRelationsMediaManager(req.adminizer, fields, rawReqData, entity.model.identity, newRecord[0].id);
115
+ await saveRelationsMediaManager(req.adminizer, fields, rawReqData, entity.model.modelname, newRecord[0].id);
116
116
  Adminizer.log.debug(`Record was updated: `, newRecord);
117
117
  if (req.body.jsonPopupCatalog) {
118
118
  return res.json({ record: newRecord });
@@ -57,7 +57,7 @@ export class DefaultMediaManager extends AbstractMediaManager {
57
57
  }
58
58
  async setRelations(data, model, modelId, widgetName) {
59
59
  let modelAssociations = await this.adminizer.modelHandler.model.get(this.modelAssoc)["_find"]({
60
- where: { modelId: modelId, model: model.toLowerCase(), widgetName: widgetName },
60
+ where: { modelId: +modelId, model: model.toLowerCase(), widgetName: widgetName },
61
61
  });
62
62
  for (const modelAssociation of modelAssociations) {
63
63
  const q = {};
@@ -70,7 +70,7 @@ export class DefaultMediaManager extends AbstractMediaManager {
70
70
  await this.adminizer.modelHandler.model.get(this.modelAssoc)["_create"]({
71
71
  mediaManagerId: this.id,
72
72
  model: model.toLowerCase(),
73
- modelId: modelId,
73
+ modelId: +modelId,
74
74
  [fieldName]: widgetItem.id,
75
75
  widgetName: widgetName,
76
76
  sortOrder: key + 1,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.3.0-build.105",
4
+ "version": "4.3.0-build.106",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  ".": "./index.js",