0001-misc-fix-insertion-in-previously-empty-table-31655.patch
wcs_olap/feeder.py | ||
---|---|---|
388 | 388 |
labels = None |
389 | 389 |
if to_insert: |
390 | 390 |
self.ex('SELECT MAX(id) FROM {name}', ctx={'name': name}) |
391 |
next_id = self.cur.fetchone()[0] + 1
|
|
391 |
next_id = (self.cur.fetchone()[0] or 0) + 1
|
|
392 | 392 |
ids = range(next_id, next_id + len(to_insert)) |
393 | 393 |
labels = zip(ids, to_insert) |
394 | 394 | |
395 |
- |