Sync - skip devStatus

This commit is contained in:
jokob-sk
2024-12-02 08:31:26 +11:00
parent 1f3fd6825b
commit acdbe06f3d
11 changed files with 3 additions and 4 deletions

0
front/php/templates/language/ca_ca.json Normal file → Executable file
View File

0
front/php/templates/language/de_de.json Normal file → Executable file
View File

0
front/php/templates/language/es_es.json Normal file → Executable file
View File

0
front/php/templates/language/fr_fr.json Normal file → Executable file
View File

0
front/php/templates/language/it_it.json Normal file → Executable file
View File

0
front/php/templates/language/nb_no.json Normal file → Executable file
View File

0
front/php/templates/language/pl_pl.json Normal file → Executable file
View File

0
front/php/templates/language/pt_br.json Normal file → Executable file
View File

0
front/php/templates/language/ru_ru.json Normal file → Executable file
View File

0
front/php/templates/language/zh_cn.json Normal file → Executable file
View File

View File

@@ -236,8 +236,9 @@ def main():
# Prepare the insert statement
if new_devices:
columns = ', '.join(k for k in new_devices[0].keys() if k != 'rowid')
placeholders = ', '.join('?' for k in new_devices[0] if k != 'rowid')
# creating insert statement, removing 'rowid', 'devStatus' as handled on the target and devStatus is resolved on the fly
columns = ', '.join(k for k in new_devices[0].keys() if k not in ['rowid', 'devStatus'])
placeholders = ', '.join('?' for k in new_devices[0] if k not in ['rowid', 'devStatus'])
sql = f'INSERT INTO Devices ({columns}) VALUES ({placeholders})'
# Extract values for the new devices
@@ -254,8 +255,6 @@ def main():
mylog('verbose', [message])
write_notification(message, 'info', timeNowTZ())
# Commit and close the connection
conn.commit()