mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 04:31:21 -03:30
set event horizon to -1 for empty tables
This commit is contained in:
parent
7e1814e234
commit
14168297bd
@ -181,7 +181,7 @@ def unpartitioned_event_horizon(cls):
|
||||
with connection.cursor() as cursor:
|
||||
try:
|
||||
cursor.execute(f'SELECT MAX(id) FROM _unpartitioned_{cls._meta.db_table}')
|
||||
return cursor.fetchone()[0]
|
||||
return cursor.fetchone()[0] or -1
|
||||
except ProgrammingError:
|
||||
return 0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user