Commit e16a80ad authored by Bruno Coudoin's avatar Bruno Coudoin

admin, make the code more robust to user change

When users are deleted we may have logs for them. This patch about us to
just have python error and continues instead of stopping.
parent 38bac21f
......@@ -364,8 +364,10 @@ class Board_list:
dict[profile.profile_id] = []
for l in list:
dict[l[1]].append(l[0])
try:
dict[l[1]].append(l[0])
except:
continue
return dict
def changed_cb(self, combobox):
......
......@@ -114,9 +114,12 @@ class Log_list:
(auser[0],) )
oneuser = self.cur.fetchall()
self.combo_user.append_text( (oneuser[0][0] + ' ' +
oneuser[0][1] + ' ' +
oneuser[0][2]))
try:
self.combo_user.append_text( (oneuser[0][0] + ' ' +
oneuser[0][1] + ' ' +
oneuser[0][2]))
except:
continue
# Save in a list the combo index => the user_id
self.user_list.append(auser[0])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment