]> OzVa Git service - shopping-channel/commitdiff
changed query to not incl backslash char
authorMax Value <greenwoodw50@gmail.com>
Thu, 6 Mar 2025 23:02:54 +0000 (23:02 +0000)
committerMax Value <greenwoodw50@gmail.com>
Thu, 6 Mar 2025 23:02:54 +0000 (23:02 +0000)
teleshopping.py

index fd65974210c72d63e230c73619a2867140276e0a..4f35c63dac15df1ae19c3a6ec665a5db1e0f5542 100755 (executable)
@@ -105,9 +105,10 @@ def admin_page(page):
 
                                valid_data = {k: type_note[k].__call__(aggrigate_data[k]) for k in aggrigate_data if k in type_note}
 
+                               data_list = ', '.join([f"{k} = '{v}'" if type(v) == str else f"{k} = {v}" for (k,v) in valid_data.items()])
                                query = f"""
                                        UPDATE state SET
-                                       {', '.join([f'{k} = \'{v}\'' if type(v) == str else f'{k} = {v}' for (k,v) in valid_data.items()])}
+                                       {data_list}
                                        WHERE id = 1;
                                        """