Description of problem: I don't know how it happens but sometimes we get watchdog records with a null system_id. This should not happen. Proposed patch: diff --git a/Server/bkr/server/model.py b/Server/bkr/server/model.py index bf91c77..4622625 100644 --- a/Server/bkr/server/model.py +++ b/Server/bkr/server/model.py @@ -206,7 +206,7 @@ labinfo_table = Table('labinfo', metadata, watchdog_table = Table('watchdog', metadata, Column('id', Integer, autoincrement=True, nullable=False, primary_key=True), - Column('system_id', Integer, ForeignKey('system.id')), + Column('system_id', Integer, ForeignKey('system.id'), nullable=False), Column('recipe_id', Integer, ForeignKey('recipe.id')), Column('recipetask_id', Integer, ForeignKey('recipe_task.id')), Column('subtask', Unicode(255)),
This will need an update to the existing DB for it to be active.