Skip to content

Commit

Permalink
Merge pull request #475 from lblod/fix/agenda-point-title-not-saving
Browse files Browse the repository at this point in the history
Fix agendapoint title saving
  • Loading branch information
elpoelma authored Jun 12, 2023
2 parents 8075b40 + 0984ea3 commit eb47f15
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions app/controllers/agendapoints/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,14 @@ export default class AgendapointsEditController extends Controller {

const behandeling = (
await this.store.query('behandeling-van-agendapunt', {
'document-container.id': this.model.documentContainer.id,
'filter[document-container][current-version][:id:]':
this.editorDocument.id,
include: 'document-container.current-version,onderwerp',
'filter[document-container][:id:]': this.model.documentContainer.id,
})
).firstObject;

const agendaItem = await behandeling.onderwerp;
agendaItem.titel = title;
if (behandeling) {
const agendaItem = await behandeling.onderwerp;
agendaItem.titel = title;
await agendaItem.save();
}

const editorDocument =
await this.documentService.createEditorDocument.perform(
Expand All @@ -292,8 +291,6 @@ export default class AgendapointsEditController extends Controller {
);

this._editorDocument = editorDocument;

await behandeling.save();
});

saveTask = task(async () => {
Expand Down

0 comments on commit eb47f15

Please sign in to comment.