zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #02154
[Merge] lp:~seif/zeitgeist/fix-598666 into lp:zeitgeist
Seif Lotfy has proposed merging lp:~seif/zeitgeist/fix-598666 into lp:zeitgeist.
Requested reviews:
Zeitgeist Framework Team (zeitgeist)
Related bugs:
#598666 Error when trying items
https://bugs.launchpad.net/bugs/598666
In an attempt to fix this bug #598666 I couldn't find anything wrong with TableLookup so I added an extra check for subject_interpretation in the _insert_event method. The branch linked here is an attempt to fix this bug. Sadly I have no idea how to replicate this.
--
https://code.launchpad.net/~seif/zeitgeist/fix-598666/+merge/39129
Your team Zeitgeist Framework Team is requested to review the proposed merge of lp:~seif/zeitgeist/fix-598666 into lp:zeitgeist.
=== modified file '_zeitgeist/engine/main.py'
--- _zeitgeist/engine/main.py 2010-10-19 10:25:33 +0000
+++ _zeitgeist/engine/main.py 2010-10-22 10:26:08 +0000
@@ -518,6 +518,12 @@
self._cursor.execute("INSERT OR IGNORE INTO storage (value) %s"
% " UNION ".join(["SELECT ?"] * len(_storage)), _storage)
+ # Make sure all subject interpretations are inserted
+ _interpretation = [subject.interpretation for subject in event.subjects if subject.interpretation]
+ if _interpretation:
+ self._cursor.execute("INSERT OR IGNORE INTO interpretation (value) %s"
+ % " UNION ".join(["SELECT ?"] * len(_interpretation)), _interpretation)
+
try:
for subject in event.subjects:
self._cursor.execute("""