order: fix order update state lifecycle
This commit is contained in:
parent
065da3e275
commit
2074955d19
@ -58,7 +58,11 @@ export default {
|
||||
async beforeUpdate(event) {
|
||||
const { data, where } = event.params;
|
||||
const { id: entityId } = where;
|
||||
const { time_start, time_end } = data;
|
||||
const { time_start, time_end, state } = data;
|
||||
|
||||
if (state && !time_start && !time_end) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!time_start || !time_end) {
|
||||
throw new Error(ERR_INVALID_TIME);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user