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