Commit 7e68a8c5 authored by Pearu Sarv's avatar Pearu Sarv
Browse files

TEIS-2349 Infringement status change duplicate request

parent b7b7700f
......@@ -30,9 +30,11 @@ export class InfringementStatusComponent implements OnInit {
handleStatusChange(status: DriversInfringementStatus) {
const previousStatus = this.currentStatus;
this.currentStatus = status;
this.facade.updateDriversInfringementStatus(this.infringement.id, status).subscribe(() => {}, () => {
this.currentStatus = previousStatus;
this.message.addToastError('edit_infringement_status_error', 2000);
this.facade.updateDriversInfringementStatus(this.infringement.id, status).subscribe(() => {}, (error) => {
if (error !== 'duplicate request') {
this.currentStatus = previousStatus;
this.message.addToastError('edit_infringement_status_error', 2000);
}
});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment