Showing
2 changed files
with
2 additions
and
2 deletions
@@ -186,7 +186,7 @@ export const getGATEWAYdevice = async (params: { organization: string }) => { | @@ -186,7 +186,7 @@ export const getGATEWAYdevice = async (params: { organization: string }) => { | ||
186 | params, | 186 | params, |
187 | }); | 187 | }); |
188 | return Promise.resolve<{ label: string; value: string }[]>( | 188 | return Promise.resolve<{ label: string; value: string }[]>( |
189 | - res.map((item) => ({ label: item.name, value: item.id })) | 189 | + res.map((item) => ({ label: item.name, value: item.tbDeviceId })) |
190 | ); | 190 | ); |
191 | }; | 191 | }; |
192 | 192 |
@@ -304,7 +304,7 @@ | @@ -304,7 +304,7 @@ | ||
304 | async function handleEdit(record: Recordable) { | 304 | async function handleEdit(record: Recordable) { |
305 | if (record.deviceType === 'SENSOR') { | 305 | if (record.deviceType === 'SENSOR') { |
306 | const res = await getGATEWAY(record.tbDeviceId); | 306 | const res = await getGATEWAY(record.tbDeviceId); |
307 | - Reflect.set(record, 'gatewayId', res.id); | 307 | + Reflect.set(record, 'gatewayId', res.tbDeviceId); |
308 | } | 308 | } |
309 | openModal(true, { | 309 | openModal(true, { |
310 | isUpdate: true, | 310 | isUpdate: true, |