Showing
2 changed files
with
2 additions
and
2 deletions
... | ... | @@ -186,7 +186,7 @@ export const getGATEWAYdevice = async (params: { organization: string }) => { |
186 | 186 | params, |
187 | 187 | }); |
188 | 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 | 304 | async function handleEdit(record: Recordable) { |
305 | 305 | if (record.deviceType === 'SENSOR') { |
306 | 306 | const res = await getGATEWAY(record.tbDeviceId); |
307 | - Reflect.set(record, 'gatewayId', res.id); | |
307 | + Reflect.set(record, 'gatewayId', res.tbDeviceId); | |
308 | 308 | } |
309 | 309 | openModal(true, { |
310 | 310 | isUpdate: true, | ... | ... |