Prevent creating a new event when editing one
Close #381 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
5c3e83acfa
commit
e895ba32be
@ -517,9 +517,11 @@ export default class EditEvent extends Vue {
|
|||||||
createOrUpdateDraft(e: Event): void {
|
createOrUpdateDraft(e: Event): void {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (this.validateForm()) {
|
if (this.validateForm()) {
|
||||||
if (this.eventId && !this.isDuplicate) this.updateEvent();
|
if (this.eventId && !this.isDuplicate) {
|
||||||
|
this.updateEvent();
|
||||||
this.createEvent();
|
} else {
|
||||||
|
this.createEvent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user