Skip to content
Snippets Groups Projects
Commit 25ebcbd2 authored by Hermann's avatar Hermann Committed by Sandro Lutz
Browse files

fix removing moderators

parent 8b717ac5
No related branches found
No related tags found
1 merge request!96fix removing moderators
......@@ -79,12 +79,10 @@ export default class NewGroup extends EditView {
}
beforeSubmit() {
const { data } = this.form;
// exchange moderator object with string of id
this.submit({
...data,
moderator: data.moderator ? data.moderator._id : undefined,
}).then(() => this.controller.changeModus('view'));
const data = Object.assign({}, this.form.data);
// exchange moderator object with string of id, will return null if moderator is null
data.moderator = data.moderator ? data.moderator._id : null;
this.submit(data).then(() => this.controller.changeModus('view'));
}
view() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment