summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2022-04-29 14:39:00 +0200
committerJonathan Bauer2022-04-29 14:39:00 +0200
commitd79ea82117ff535202172e46a1c810c3ef13b8d8 (patch)
treeb9fb86c805a73d15cb1a13e999fc7d036e363430
parenthuch (diff)
downloadbwlp-statistics-d79ea82117ff535202172e46a1c810c3ef13b8d8.tar.gz
bwlp-statistics-d79ea82117ff535202172e46a1c810c3ef13b8d8.tar.xz
bwlp-statistics-d79ea82117ff535202172e46a1c810c3ef13b8d8.zip
import.py: import baseSystems
-rw-r--r--import/import.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/import/import.py b/import/import.py
index 2c22363..274c1f4 100644
--- a/import/import.py
+++ b/import/import.py
@@ -197,6 +197,15 @@ for i in [7, 30, 90]:
item['total']
))
+ # Add base systems
+ for item in data[iStr]['baseSystem']:
+ cursor.execute('INSERT INTO basesystem(report, days, system, count) VALUES (%s, %s, %s, %s)',(
+ reportId,
+ i,
+ item['system'],
+ item['count']
+ ))
+
db.commit()
db.close()