We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5d336e commit 5ff0963Copy full SHA for 5ff0963
1 file changed
src/app/repositories/repository-form.component.ts
@@ -499,9 +499,16 @@ export class RepositoryFormComponent extends AsyncHandler implements OnInit {
499
this.saving = i18n(`${this._name}.SAVING`);
500
this._dialog_ref.disableClose = true;
501
const item_json = item.toJSON ? item.toJSON() : item;
502
+ const form_value = { ...this.form.value };
503
+ if (form_value.root_path) {
504
+ form_value.root_path = form_value.root_path.replace(
505
+ /^\/+|\/+$/g,
506
+ '',
507
+ );
508
+ }
509
const form_item: PlaceRepository = item.id
- ? cleanObject({ ...item_json, ...this.form.value }, [undefined])
- : { ...item_json, ...this.form.value };
510
+ ? cleanObject({ ...item_json, ...form_value }, [undefined])
511
+ : { ...item_json, ...form_value };
512
(form_item.id
513
? updateRepository(
514
form_item.id,
0 commit comments