mirror of
https://github.com/clearlinux/telemetrics-backend.git
synced 2026-09-07 06:14:48 +00:00
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 <patrick.mccarty@intel.com>
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user