remove unnecessary filter
parent
1102a30a15
commit
3051672d84
|
|
@ -24,10 +24,7 @@ export const moveOccupancyTypeFieldUp = (occupancyTypeFieldId) => {
|
||||||
const result = database
|
const result = database
|
||||||
.prepare("update OccupancyTypeFields" +
|
.prepare("update OccupancyTypeFields" +
|
||||||
" set orderNumber = ? - 1" +
|
" set orderNumber = ? - 1" +
|
||||||
" where occupancyTypeFieldId = ?" +
|
" where occupancyTypeFieldId = ?")
|
||||||
(currentField.occupancyTypeId
|
|
||||||
? " and occupancyTypeId = '" + currentField.occupancyTypeId + "'"
|
|
||||||
: " and occupancyTypeId is null"))
|
|
||||||
.run(currentField.orderNumber, occupancyTypeFieldId);
|
.run(currentField.orderNumber, occupancyTypeFieldId);
|
||||||
database.close();
|
database.close();
|
||||||
clearOccupancyTypesCache();
|
clearOccupancyTypesCache();
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,7 @@ export const moveOccupancyTypeFieldUp = (occupancyTypeFieldId: number | string):
|
||||||
.prepare(
|
.prepare(
|
||||||
"update OccupancyTypeFields" +
|
"update OccupancyTypeFields" +
|
||||||
" set orderNumber = ? - 1" +
|
" set orderNumber = ? - 1" +
|
||||||
" where occupancyTypeFieldId = ?" +
|
" where occupancyTypeFieldId = ?"
|
||||||
(currentField.occupancyTypeId
|
|
||||||
? " and occupancyTypeId = '" + currentField.occupancyTypeId + "'"
|
|
||||||
: " and occupancyTypeId is null")
|
|
||||||
)
|
)
|
||||||
.run(currentField.orderNumber, occupancyTypeFieldId);
|
.run(currentField.orderNumber, occupancyTypeFieldId);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue