From 019054ece1dee02e73d038efcccd96abd7dc7e0f Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Fri, 22 Sep 2017 12:10:04 -0700 Subject: [PATCH] Fix regression in model code used by crash guilty processing Some code in crash.py expects there to be a named parameter named 'id' for get_new_crash_records(), but the method definition recently renamed that parameter to '_id'. This was resulting in the following exception: TypeError: get_new_crash_records() got an unexpected keyword argument 'id' Signed-off-by: Patrick McCarty --- shared/model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/model.py b/shared/model.py index 1901846..2b30208 100644 --- a/shared/model.py +++ b/shared/model.py @@ -392,15 +392,15 @@ class Record(db.Model): return q.all() @staticmethod - def get_new_crash_records(classes=None, _id=None): + def get_new_crash_records(classes=None, id=None): q = db.session.query(Record).join(Classification) if not classes: classes = ['org.clearlinux/crash/clr'] q = q.filter(Classification.classification.in_(classes)) q = q.filter(Record.os_name == 'clear-linux-os') q = q.filter(Record.processed is False) - if _id: - q = q.filter(Record.id == _id) + if id: + q = q.filter(Record.id == id) return q.all() @staticmethod