mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-06 17:15:38 -08:00
Sync - skip devStatus
This commit is contained in:
0
front/php/templates/language/ca_ca.json
Normal file → Executable file
0
front/php/templates/language/ca_ca.json
Normal file → Executable file
0
front/php/templates/language/de_de.json
Normal file → Executable file
0
front/php/templates/language/de_de.json
Normal file → Executable file
0
front/php/templates/language/es_es.json
Normal file → Executable file
0
front/php/templates/language/es_es.json
Normal file → Executable file
0
front/php/templates/language/fr_fr.json
Normal file → Executable file
0
front/php/templates/language/fr_fr.json
Normal file → Executable file
0
front/php/templates/language/it_it.json
Normal file → Executable file
0
front/php/templates/language/it_it.json
Normal file → Executable file
0
front/php/templates/language/nb_no.json
Normal file → Executable file
0
front/php/templates/language/nb_no.json
Normal file → Executable file
0
front/php/templates/language/pl_pl.json
Normal file → Executable file
0
front/php/templates/language/pl_pl.json
Normal file → Executable file
0
front/php/templates/language/pt_br.json
Normal file → Executable file
0
front/php/templates/language/pt_br.json
Normal file → Executable file
0
front/php/templates/language/ru_ru.json
Normal file → Executable file
0
front/php/templates/language/ru_ru.json
Normal file → Executable file
0
front/php/templates/language/zh_cn.json
Normal file → Executable file
0
front/php/templates/language/zh_cn.json
Normal file → Executable 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()
|
||||
|
||||
Reference in New Issue
Block a user