Merge pull request #4435 from MaximilianKrambach/motion_deleteCategory
fix unsetting some values
This commit is contained in:
commit
d77abf5934
@ -153,9 +153,7 @@ export class CategoryListComponent extends BaseViewComponent implements OnInit {
|
||||
public async onSaveButton(viewCategory: ViewCategory): Promise<void> {
|
||||
if (this.updateForm.dirty && this.updateForm.valid) {
|
||||
const cat: Partial<Category> = { name: this.updateForm.get('name').value };
|
||||
if (this.updateForm.get('prefix').value) {
|
||||
cat.prefix = this.updateForm.get('prefix').value;
|
||||
}
|
||||
cat.prefix = this.updateForm.get('prefix').value || '';
|
||||
await this.repo.update(cat, viewCategory);
|
||||
this.updateForm.markAsPristine();
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ export class MotionMultiselectService {
|
||||
if (selectedChoice) {
|
||||
for (const motion of motions) {
|
||||
await this.repo.update(
|
||||
{ category_id: selectedChoice.action ? 0 : (selectedChoice.items as number) },
|
||||
{ category_id: selectedChoice.action ? null : (selectedChoice.items as number) },
|
||||
motion
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user